Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
wxSmith, unable to center anything horizontally
ouch:
I'm trying to center buttons and stuff in a wxflexgridsizer but wxSmith is not letting me do this.I know of the changes made to wxWidgets that limits what direction you can center sizers. However it seems odd that I can't even center a button horizontally within one.
using codeblocks 32bit rev 10269 compiled against wxwidgets 2.8 on win 7 64 bit using 32bit tdm mingw 4.7.2.
Can anyone else reproduce this?
edit: should probably mention that while codeblocks is running wx 2.8 my app uses the latest git repo of wx 3.x.
edit2: also, if I add the wxALIGN_CENTER_HORIZONTAL flags manually to the code it works. So it really does seem to be something amiss with wxSmith.
oBFusCATed:
Patches welcome:)
Jenna:
--- Quote from: ouch on June 10, 2015, 09:07:36 pm ---I'm trying to center buttons and stuff in a wxflexgridsizer but wxSmith is not letting me do this.I know of the changes made to wxWidgets that limits what direction you can center sizers. However it seems odd that I can't even center a button horizontally within one.
using codeblocks 32bit rev 10269 compiled against wxwidgets 2.8 on win 7 64 bit using 32bit tdm mingw 4.7.2.
Can anyone else reproduce this?
edit: should probably mention that while codeblocks is running wx 2.8 my app uses the latest git repo of wx 3.x.
edit2: also, if I add the wxALIGN_CENTER_HORIZONTAL flags manually to the code it works. So it really does seem to be something amiss with wxSmith.
--- End quote ---
I made the changes and will see why this happens.
The changes should not affect flexgridsizer (if I remember correctly). And if it does it would probably be a bug.
Jenna:
Should be fixed in trunk.
Really nasty beginners error.
Sorry and thanks for reporting !
Commaster:
The same happens, in my case, with BoxSizers. And it does change the place controls end up in the program. (i.e. Writing wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL manually in the generated code makes it look better)
Example: I usually press the middle RadioButton on the side bar and the actual selection moves either to the top center or left center, depending on the BoxSizer Orientation.
Ubuntu, svn 10358, wx2.8.12, x64.
Navigation
[0] Message Index
[#] Next page
Go to full version