basic control and button bar frame
Posted: Mon Sep 14, 2015 10:05 pm
Hi all,
I'm looking to make an application in Python, and trying out wxCrafter as the xrc generator.
I'm experimenting by designing a basic multiline text control, at the top of the frame, with two buttons at the bottom (say OK, Cancel). Like most dialogues, I would like the two buttons on the right side of the frame.
For the right alignment of buttons initially I tried
- wxbox sizer, added wxtextcntrl, then a wxStdDialogueButtonSizer
-- I can then add one button to the btn sizer, but the second jumps to the top of the screen ?
- secondly, tried adding a wxfelxgridsizer, with 3 columns, zero rows. I added a spacer first, then two buttons
-- however I could only get the two buttons on left hand side, despite the spacer having proportion 1, and the buttons 0
- finally I used a horizontal box, added two buttons, then simply right aligned it.
-- this worked.
My question, what's the best approach to right align several buttons at the bottom of a frame (as I assume there are a few ways of doing this)?
Many thanks for any advice.
Marcus
I'm looking to make an application in Python, and trying out wxCrafter as the xrc generator.
I'm experimenting by designing a basic multiline text control, at the top of the frame, with two buttons at the bottom (say OK, Cancel). Like most dialogues, I would like the two buttons on the right side of the frame.
For the right alignment of buttons initially I tried
- wxbox sizer, added wxtextcntrl, then a wxStdDialogueButtonSizer
-- I can then add one button to the btn sizer, but the second jumps to the top of the screen ?
- secondly, tried adding a wxfelxgridsizer, with 3 columns, zero rows. I added a spacer first, then two buttons
-- however I could only get the two buttons on left hand side, despite the spacer having proportion 1, and the buttons 0
- finally I used a horizontal box, added two buttons, then simply right aligned it.
-- this worked.
My question, what's the best approach to right align several buttons at the bottom of a frame (as I assume there are a few ways of doing this)?
Many thanks for any advice.
Marcus