[Lazarus] TCustomControl.Caption setter needs Invalidate

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Lazarus] TCustomControl.Caption setter needs Invalidate

Free Pascal - Lazarus mailing list
TCustomControl.Caption setter
(ie TControl.SetText)
misses Invalidate call.
So, my ATButtons (ATButton based on CustomControl) miss
visual update, when user changes app i18n.

--
Regards,
Alexey

--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] TCustomControl.Caption setter needs Invalidate

Free Pascal - Lazarus mailing list

Hi,

 

you have to override one of these methods:

 

procedure RealSetText; override;  //this is done in TSpeedBtn

or

procedure TextChanged; override;  //this is what I do in some components of ECControl

 

and call Invalidate; (and inherited;) there.

 

V.

______________________________________________________________
> Od: Alexey via Lazarus <[hidden email]>
> Komu: Lazarus mailing list <[hidden email]>
> Datum: 30.07.2017 00:50
> Předmět: [Lazarus] TCustomControl.Caption setter needs Invalidate
>

TCustomControl.Caption setter
(ie TControl.SetText)
misses Invalidate call.
So, my ATButtons (ATButton based on CustomControl) miss
visual update, when user changes app i18n.

--
Regards,
Alexey

--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus

--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] TCustomControl.Caption setter needs Invalidate

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On 30.07.2017 0:50, Alexey via Lazarus wrote:
> TCustomControl.Caption setter
> (ie TControl.SetText)
> misses Invalidate call.
> So, my ATButtons (ATButton based on CustomControl) miss
> visual update, when user changes app i18n.

TCustomControl doesn't paint the caption so it doesn't need the
Invalidate call.

Ondrej


--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] TCustomControl.Caption setter needs Invalidate

Free Pascal - Lazarus mailing list
While we're at it, why is THintWindow.Paint moved to public? Please fix back to protected.

--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] TCustomControl.Caption setter needs Invalidate

Free Pascal - Lazarus mailing list
On 30.07.2017 9:32, Anthony Walter wrote:
While we're at it, why is THintWindow.Paint moved to public? Please fix back to protected.

Correct. Moved to protected.

Ondrej


--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Loading...