[Lazarus] How to obtain the "real" color of a control @runtime?

zeljko zeljko at holobit.net
Wed Dec 24 09:02:22 CET 2014


On 12/23/2014 06:30 PM, Bart wrote:
> On 12/23/14, zeljko <zeljko at holobit.net> wrote:
>
>> No, clDefault is incorrect at any time. To obtain color we have:
>>       function GetColorResolvingParent: TColor;
>>       function GetRGBColorResolvingParent: TColor;
>
> Thanks.
>
> I'm trying to create an "overlay" for a TEdit which van display a
> TextHint property
> (http://docwiki.embarcadero.com/Libraries/XE2/en/Vcl.StdCtrls.TCustomEdit.TextHint).
> Life would be so much easier if we could draw on the TEdit's canvas
> (or even if a TEdit could be the parent of some other TComponent.

Under Qt it's possible, but under eg gtk2 is pretty tricky. Don't know 
for carbon/cocoa and win32. Same applies for drawing over TEdit canvas.

z.






More information about the Lazarus mailing list