On Mon, 1 Dec 2025 19:56:17 -0800 Kenneth Porter wrote:
KP> I noticed that the label on a wxRadioBox is not greyed-out.
You don't say, but this is only the case under MSW AFAICS.
KP> Digging down into the code, I find that this is intentional in the
KP> wxStaticBox within the wxRadioBox, as the label is sometimes used to
KP> reawaken the control.
This is only supposed to happen when the label is a control, e.g. a check
box or radio button, which is not the case here, so it's a red herring.
KP> So I have this ghostly "live" label floating in a sea of greyed-out
KP> controls, which looks quite odd.
KP>
KP> Is there a way to disable that label?
Calling Disable() should do it and it's a bug that it does not.
Unfortunately I don't immediately see anything wrong, the window does get
WS_DISABLED style but its label remains normal and I don't see why. I do
see that our code in wxStaticBox::OnPaint() is wrong because it doesn't
take the enabled status into account, but it shouldn't be used in this
case (and isn't, I checked). We probably could always use custom painting
for disabled boxes, but this shouldn't be necessary...
Please open an issue for this (this can be reproduced on the radio page of
the widgets sample, so no extra code is required) so that we have at least
a trace of this somewhere.
Thanks,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
https://www.tt-solutions.com/