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

bug #16846: Radiobox layout: wx-2.7 regression

Submitted by:  Greg Chicares <chicares>
Submitted on:  Wed 14 Jun 2006 04:01:51 PM UTC  
 
Category: GUISeverity: 3 - Normal
Item Group: wxwindows library defectStatus: Fixed
Privacy: PublicAssigned to: Wendy Boutin <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>
Project 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>
Project 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>
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 09 Aug 2013 03:24:59 PM UTCkmmurphyOpen/ClosedOpen=>Closed
    Fri 09 Aug 2013 01:54:26 PM UTCkmmurphyStatusReady For Test=>Fixed
    Sun 03 Aug 2008 12:28:49 AM UTCchicaresAssigned tozeitlin=>wboutin
    Sat 02 Aug 2008 04:04:30 PM UTCzeitlinStatusNone=>Ready For Test
    Wed 14 Jun 2006 04:01:51 PM UTCchicaresAttached File-=>Added radiobox_layout_problem.png, #10194

    Back to the top


    Powered by Savane 3.1-cleanup