i have a problem with my UI design with wxWidgets:
I want to have a table (wxGrid) and four buttons below it on a panel.
If the table becomes too long so that it does not fit into the window any more, i want it to have scrollbars into the necessary direction.
The buttons should be visible in any case.
My actual code in the constructor of my wxPanel-child-class looks like this:
Code: Select all
wxGridSizer* buttonSizer = new wxGridSizer( 1, 4, 10, 10 ); buttonSizer->Add( Button1 ); buttonSizer->Add( Button2 ); buttonSizer->Add( Button3 ); buttonSizer->Add( Button4 ); wxFlexGridSizer* tableFlexGridSizer = new wxFlexGridSizer( 2, 1, 10, 10 ); tableFlexGridSizer->AddGrowableRow( 1 ); tableFlexGridSizer->Add( LoadGrid, 1, wxGROW ); tableFlexGridSizer->Add( buttonSizer, 1, wxGROW ); tableFlexGridSizer->Fit( this ); tableFlexGridSizer->SetSizeHints( this ); SetSizer( tableFlexGridSizer );
The white area right of the table should not be there.
The table should be not that high so that the buttons are visible.
It would be great if you could help me, because i don't get to my goal in spite of having tried much on my own and read some tutorials.
many thanks in advance