I'm having troubles with sizers :S...
I want to have a frame, with a listbox & 2 staticbox(sizers). Now when I change the size of my frame, the listbox needs to be reshaped, but the 2 staticboxes should keep the same size...
Currently I tried this (I am still freakin' around with it though ;)):
wxStaticText * t;
wxPanel *m_panel = new wxPanel( this );
wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
topsizer->Add(
new wxListView(m_panel, wxID_ANY),
1,
wxEXPAND|wxALL,
4 );
wxStaticBox * pBottomPane = new wxStaticBox( m_panel, wxID_ANY, wxEmptyString );
wxStaticBoxSizer * st = new wxStaticBoxSizer(pBottomPane, wxHORIZONTAL );
wxBoxSizer * s = new wxBoxSizer( wxVERTICAL );
s->Add(
t = new wxStaticText( m_panel, wxID_ANY, _("Consignee") ),
0,
0,
0 );
s->SetItemMinSize( t, wxSize(121, -1) );
st -> Add( s, 0, wxSTRETCH_NOT, 0 );
s = new wxBoxSizer( wxVERTICAL );
s->Add( t = new wxStaticText( m_panel, wxID_ANY, _(": testje") ), 0, 0, 0 );
s->SetItemMinSize( t, wxSize(144, -1) );
st->Add( s, 0, wxSTRETCH_NOT, 0 );
st->SetSizeHints(pBottomPane);
topsizer->Add( st, 0, wxEXPAND, 0 );
m_panel->SetSizer( topsizer ); topsizer->SetSizeHints( m_panel ); ------------------------ Website: www.KaReLs0ft.be |