Following alex advices, i’ve used both “text/textctrl.rb” and
“etc/threaded.rb” to build my first wxApp.
I’ve changed the Sizer type mainly (from “Wx::BoxSizer” to
“Wx::FlexGridSizer”).
I didn’t find the way to let @log (Wx::TextCtrl) span 2 columns. At the
time
of writing it’s growing only vertically.
And also how to get 16px filler|spacer|border (for window resizer,
bottom-right corner, on Mac OS X) for SOUTH and EAST and 5/16 px for
NORTH
and WEST
What i want as a layout;
±—
5/16 px
|
±------------------------------------------------------------------v----------+
| |<-- 5/16
px |
| [ Fixed length Wx::Button ] [ <---------- Growable Wx::Gauge
----^-----> ] |
|
|
|
±-----------------------------------------------------------------------+
|
| |
^ | |
| |
| | |
| |
| | |
| | <------------------ Growable Wx::TextCtrl ----------------->
| |<-- 16 px
| |
| | |
| |
| | |
| |
V | |
|
±---------------------------------------------------------------v-------+
|
|
|
±-----------------------------------------------------------------------------+
^
|
±—
16 px
What i get:
±-----------------------------------------------------------------------------+
|
|
| [ Fixed length Wx::Button ] [ <---------- Growable Wx::Gauge ---------->
] |
|
|
|
±------------------------+
|
| | ^
| |
| | |
| |
| | |
| |
| |Fixed width Wx::TextCtrl
| |
| | |
| |
| | |
| |
| | V
| |
|
±------------------------+
|
|
|
±-----------------------------------------------------------------------------+
What i’ve cut’n paste as code:
The sizer:
sizer = Wx::FlexGridSizer.new( 2, 2, 5, 5)
sizer.add_growable_col( 1, 1)
sizer.add_growable_row( 1, 1)
Three items added:
@button = Wx::Button.new(panel, :label => 'Export')
sizer.add(button, 0, Wx::ADJUST_MINSIZE|Wx::ALL, 2 )
@gauge = Wx::Gauge.new(panel, :range => STEPS)
sizer.add(@gauge, 0, Wx::GROW|Wx::ALL, 2)
@log = LogTextCtrl.new(panel) # (LogTextCtrl < Wx::TextCtrl)
sizer.add(@log, 1, Wx::GROW|Wx::ALL, 2)
Yvon