Groupbox Caption

Am I mis-remembering? I thought that one could change the TextColor of a groupbox caption?
Was this an attribute that we could change in the past, but no longer? :frowning:

AFAIK it never has been possible.
A long while ago I had some weird issues with the Groupbox control having the caption been used.
For inexplicable reason these were solved when setting the caption to “”
Since that day I use a label control on top of it instead. If you start and end with a space it looks like a groupbox-caption and you can also set the color of it.

I thought about the label idea… but I have dozens of windows some with 2 or 3 groupboxes. and dread redoing them…

I didn’t realize that the caption didn’t “gray out” if you disabled the control :frowning:

[quote=333521:@Dave S]
I didn’t realize that the caption didn’t “gray out” if you disabled the control :([/quote]

Labels don’t either… but they used to… Apple has stopped caring about having constant visual clues apparently…

  • Karen (who changes labels to disabled text color in one when needed even it not the current UI)

Yeah… my original code just disabled the groupbox
then I realized that the labels INSIDE didn’t change…
so I created a method to address each label (in a control set) to change its color
that is when I noticed the groupbox itself didn’t change either :frowning:

but at least you CAN change a Label… you CAN’T change a Groupbox :frowning:

I don’t recall a time I’ve seen a label disabled in software I use.

Controls get disabled, but I don’t see a need to disable a label. They’re still useful to let the user know what they’re labeling, even if the item they are labeling is disabled.

I don’t have a data-backed argument for my opinion, so I stayed quiet on this one.

my rationale is this.
I have two groupboxes each containing various controls… labels, textfields, listbox etc.
I do not want the bottom groupbox to be “active” until the user has filled in a minimal amount of data in the top groupbox
until that time, I want ALL the contents to be “gray”… having somethings “gray” and others “black” looks wrong.

[quote=333531:@Dave S]Yeah… my original code just disabled the groupbox
then I realized that the labels INSIDE didn’t change…[/quote]
What about creating nice containercontrols. Enable and disabling is quite straight forward, including everything which is in it.

first off… a groupbox is a “container”… .so disabling it does in fact “disable” everything inside of it…
the issue is the visual aspects of a label (and a listbox for that matter) do not change just because the enable flag did
so I would have to loop thru all the controls, decide who owned them, and change the textcolor based on the flag…
which is exactly what I am doing now.

[code]Public Sub DoEnable(extends g as GroupBox, enable as Boolean)
Dim w As Window = g.TrueWindow
if w<>nil then
for i as Integer = 0 to w.ControlCount-1
Dim ctrl As RectControl = RectControl(w.Control( i))
if ctrl<>nil then

    if ctrl.Parent = g then
      ctrl.Enabled = enable // or whatever you want depending on the control class
    End If
  End If
Next

End If
End Sub
[/code]

Jean-Yves… that does not solve the problem

Why not create your own groupbox with a ContainerControl with styled label, enabled property and so on ? Then just make the super of your present out of the box groupboxes with your new control.