[Lazarus] How to obtain the color of a component?
zeljko
zeljko at holobit.net
Fri Oct 21 13:11:54 CEST 2011
On Friday 21 of October 2011 09:25:27 Graeme Geldenhuys wrote:
> On 2011-10-20 17:57, Felipe Monteiro de Carvalho wrote:
> > I have my TCDPageControl on top of a form, but for
> > TCDPageControl.Color I get just clDefault, which turns out to be
> > black. =( using Parent.GetDefaultColor(dcBrush) also returned black in
> > Windows...
>
> In fpGUI have have a fpgColorToRGBColor() - this will lookup and
> translate (if required) "color aliases" to real RGB values. If memory
> serves me right, Delphi (and probably Lazarus too) has a similar call?
> Try something like ColorToRGB(CDPageControl1.Color) and see if that does
> the trick.
Better solution would be CDPageControl1.Brush.Color, since
CDPageControl1.Color can be clDefault and then you'll get nothing.
zeljko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20111021/74fd4b7d/attachment-0003.html>
More information about the Lazarus
mailing list