<p style="padding:0 0 0 0; margin:0 0 0 0;">Hi,</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">just tested on Qt. My TEdits are also white.</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">This line:</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">writeln(ColorToString(Edit1.Brush.Color));</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">writes out clWindow for default color (clDefault) and clRed for clRed.</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">Vojtěch </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">______________________________________________________________<br />
> Od: Bart <bartjunk64@gmail.com><br />
> Komu: Lazarus mailing list <lazarus@lists.lazarus.freepascal.org><br />
> Datum: 22.12.2014 18:51<br />
> Předmět: [Lazarus] How to obtain the "real" color of a control @runtime?<br />
></p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">Hi,<br />
<br />
I'm trying to obtain the "real" color of a control (TEdit) at runtime.<br />
The color at design time is set to clDefault ($20000000), but I need<br />
to get the RGB value (which in this case should be $FFFFFF, since with<br />
the current theme the default color of a TEdit on my OS is white).<br />
I need this s I can have another control paint in that same color on<br />
it's canvas.<br />
<br />
ColorToRGB just gave me $0, whic is not what I'm looking for.<br />
<br />
Any hints?<br />
<br />
Bart<br />
<br />
--<br />
_______________________________________________<br />
Lazarus mailing list<br />
Lazarus@lists.lazarus.freepascal.org<br />
<a href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus</a></p>