
The following code sets the ForeColor of the GroupBox to pink but this settings cascades to all the child controls as well: groupbox.ForeColor Color. (*) There is some text-drawing code in the GroupBoxWindowProc, but this is a workaround for the issue that the caption of a disabled groupbox is not grayed as usual - it will break once Microsoft decides to center the caption instead of left-align it. I need to change the group box text to a specific color without changing the color of what is inside the group box. A couple of those possibilities might want vertex colors, which Ive also. You should turn off ParentFont of the contained controls before doing this to prevent them becoming bold too. menus to change the visual components properties (like Lazarus or Delphi). If you only want to highlight the groupbox caption it is maybe an idea to set := this works in Windows (until Microsoft will decide to disable even this). But you must be aware that this will look different from the native groupboxes. If you REALLY need a colored caption you should experiment with a TPanel to which you add a TBevel and a TLabel - then you have all visual details under your control. The groupbox is not drawn by explicit code somewhere in the groupbox unit (stdctrls) nor in the widgetset unit (win32wsstdctrls.pp *), there are no ThemeServices to be called so that something looking like a native groupbox cannot be emulated.įor this reason, I do not see a way to add a "TGroupBo圎x" to the ExCtrls collection where I already put the extended checkboxes and radiobuttons.

That's the price you have to pay for a common appearance of your program. It depends on the widgetset whether you can change the color of the groupbox caption.

As usual, colors, although they have entries in the Object Inspector, are determined by the widgetset.
