MSW: wxRadioBox static box label remains enabled when radio box is disabled (Issue #26011)

23 views
Skip to first unread message

SpareSimian

unread,
Dec 3, 2025, 12:46:31 PMDec 3
to wx-...@googlegroups.com, Subscribed
SpareSimian created an issue (wxWidgets/wxWidgets#26011)

From the users mailing list:

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...

https://groups.google.com/g/wx-users/c/mHHAXQ7cAyo


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26011@github.com>

VZ

unread,
Dec 14, 2025, 11:51:59 AM (6 days ago) Dec 14
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26011)

FWIW I've checked this in a simple example using Win32 API directly and the native control just doesn't grey out its label when it's disabled, so we're going to have to need to do it ourselves if we want this to work.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26011/3651640552@github.com>

Reply all
Reply to author
Forward
0 new messages