This patch needs to be applied instead of the previous one. I managed to fix the background color issue! The Canvas was set to clBackground instead of clBtnFace.
Regards, - Graeme - On 25/10/06, Graeme Geldenhuys <[EMAIL PROTECTED]> wrote:
Hi, As the subject line says: The TTabControl doesn't accept other controls. It doesn't act like a container, when it is supposed to. The patch make it accept other componets at design time, but the patch is not 100% as you can move the child component over the Tabs, which shouldn't be allowed. I have no idea how to limit that. See the two images attached. Also I tried to get rid of the clTeal (Linux) or clBlue (Windows) background that can't be overriden, but that didn't work. Patch needs to be applied from the root Lazarus directory. Regards, - Graeme - -- There's no place like 127.0.0.1
-- There's no place like 127.0.0.1
Index: lcl/include/tabcontrol.inc =================================================================== --- lcl/include/tabcontrol.inc (revision 10102) +++ lcl/include/tabcontrol.inc (working copy) @@ -536,7 +536,7 @@ TS : TTextStyle; begin ARect := GetClientRect; - Canvas.Color:=clBackground; + Canvas.Color := clBtnFace; Canvas.FillRect(ARect); ARect:=GetDisplayRect; InflateRect(ARect,BorderWidth,BorderWidth); @@ -578,6 +578,9 @@ inherited Create(TheOwner); FStyle:=tsTabs; FTabPosition:=tpTop; + ControlStyle := ControlStyle + + [csAcceptsControls] - [csOpaque]; // we need the default background + FImageChangeLink := TChangeLink.Create; FImageChangeLink.OnChange := @ImageListChange; FTabs:=TTabControlNoteBookStrings.Create(Self);
