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

Submitter:  Greg Chicares <chicares>
Submitted:  Wed 14 Jun 2006 04:01:51 PM UTC
   
 
Category:  GUI Severity:  3 - Normal
Item Group:  wxwindows library defect Status:  Fixed
Privacy:  Public Assigned to:  wboutin
Open/Closed:  Closed

Fri 09 Aug 2013 01:54:26 PM UTC, comment #2: 

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

Kimberly Murphy <kmmurphy>
Group Member
Sat 02 Aug 2008 04:04:30 PM UTC, 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;
+
 #if wxUSE_VALIDATORS
     SetValidator(val);
 #else

Vadim Zeitlin <zeitlin>
Group Member
Wed 14 Jun 2006 04:01:51 PM UTC, 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">
            <flag>wxALIGN_CENTER_VERTICAL</flag>
            <object class="wxRadioBox" name="FundChoiceType">
******        <style>wxRA_SPECIFY_COLS</style>
                <content>
                    <item>Average fund</item>
                    <item>Override fund</item>
                    <item>Choose funds</item>
                </content>
            </object>
        </object>

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>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-08-09 kmmurphy Open/ClosedOpen Closed
    2013-08-09 kmmurphy StatusReady For Test Fixed
    2008-08-03 chicares Assigned tozeitlin wboutin
    2008-08-02 zeitlin StatusNone Ready For Test
    2006-06-14 chicares Attached File- Added radiobox_layout_problem.png, #10194

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code