bugLet me illustrate... - Bugs: bug #16846, Radiobox layout: wx-2.7 regression


You are not allowed to post comments on this tracker with your current authentication level.

bug #16846: Radiobox layout: wx-2.7 regression

Submitted by:  Greg Chicares <chicares>
Submitted on:  Wed Jun 14 16:01:51 2006  
Category: GUISeverity: 3 - Normal
Item Group: wxwindows library defectStatus: Fixed
Privacy: PublicAssigned to: Wendy Boutin <wboutin>
Open/Closed: Closed

Fri Aug 9 13:54:26 2013, comment #2:

Tested and confirmed this defect is no longer observed with lmi-20130719T1951Z and wx-2.9.3.

Kimberly Murphy <kmmurphy>
Project Member
Sat Aug 2 16:04:30 2008, comment #1:

There was indeed a bug in wx when the radiobox style didn't contain neither wxRA_SPECIFY_COLS nor wxRA_SPECIFY_ROWS, thanks for noticing it!

I've trivially fixed it in both trunk and 2.8 branch in r54927 of wx svn. Here is the patch I committed, just for your reference:

--- src/msw/radiobox.cpp (revision 54921)
+++ src/msw/radiobox.cpp (working copy)
@@ -150,6 +150,11 @@
if ( !wxStaticBox::Create(parent, id, title, pos, size, style, name) )
return false;

+ // the code elsewhere in this file supposes that either wxRA_SPECIFY_COLS
+ // or wxRA_SPECIFY_ROWS is set, ensure that this is indeed the case
+ if ( !(style & (wxRA_SPECIFY_ROWS | wxRA_SPECIFY_COLS)) )
+ style |= wxRA_SPECIFY_COLS;

Vadim Zeitlin <zeitlin>
Project Member
Wed Jun 14 16:01:51 2006, original submission:

I think there's a radiobox layout problem with wx-2.7 and wxxrc.
I'd call it a regression error because it works fine with 2.5.4 .
It's not critical for us because we have found and applied a
reasonable workaround, but we can't be sure whether it masks
some other problem that we haven't yet observed.

Here's a snippet from 'xml_notebook.xrc' that generates the
radiobox shown in the attachment. We needed to add the line
marked with asterisks in the left margin as a workaround.

<object class="sizeritem">
<object class="wxRadioBox" name="FundChoiceType">

                • <style>wxRA_SPECIFY_COLS</style>

<item>Average fund</item>
<item>Override fund</item>
<item>Choose funds</item>

The attachment shows how this is rendered using 2.7 without
the above asterisked change.

My guess is that row layout is the default in one part of wx,
while column layout is the default in another. The attachment
shows column layout in a box that seems to have been widened
to accommodate row layout. The groupbox is the same width as
shown it the attachment, if I use wxRA_SPECIFY_ROWS instead.
With wxRA_SPECIFY_COLS specified, it's much less wide. With
either style explicitly specified, layout is correct. Layout
is also correct with wx-2.5.4, whether wxRA_SPECIFY_ROWS,
wxRA_SPECIFY_COLS, or neither is specified.

Greg Chicares <chicares>
Project Administrator


Attached Files


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by kmmurphy (Posted a comment)
  • -unavailable- added by chicares (Updated the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri Aug 9 15:24:59 2013kmmurphyOpen/ClosedOpen=>Closed
    Fri Aug 9 13:54:26 2013kmmurphyStatusReady For Test=>Fixed
    Sun Aug 3 00:28:49 2008chicaresAssigned tozeitlin=>wboutin
    Sat Aug 2 16:04:30 2008zeitlinStatusNone=>Ready For Test
    Wed Jun 14 16:01:51 2006chicaresAttached File-=>Added radiobox_layout_problem.png, #10194

    Back to the top

    Powered by Savane 3.1-cleanup1