On Fri, Oct 21, 2011 at 9:47 AM, Paul Ishenin <i...@kmiac.ru> wrote: > Why do you use Parent. ?
That's the whole reason why I have this problem at all. My control in question here is TCDPageControl, which is a custom drawn page control, therefore I have no background color of my own (although the user might specify one), there are no native themes for my control nor clDefault makes any sense for it, I just want to obtain the color of my parent, so that I can make my control paint the same color that he has, which is the form in this case, but it could be anything. Now, regarding your suggestion, no it does not work: procedure TCDCustomTabControlDrawerWinCE.DrawToIntfImage(ADest: TFPImageCanvas; FPImg: TLazIntfImage); var lColor: TColor; lFPColor: TFPColor; x, y: Integer; begin if CDTabControl.Color = clDefault then lColor := CDTabControl.GetDefaultColor(dctBrush) <-- I get black! else lColor := ColorToRGB(CDTabControl.Color); // Background lFPColor := TColorToFPColor(lColor); FPImg.FillPixels(lFPColor); end; -- Felipe Monteiro de Carvalho -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus