Tried to do in one window (wxFrame) two zones: the first (upper) zone is the table grid (wxFlexGridSizer) with progressive filling of the elements (e.g., wxStaticText, wxTextCtrl), the second (bottom) is by push-button (wxButton). The difficulty lies in the fact that the first zone can be scrolled sideways, and the second would always be in place (not shifted).
Tried to implement this way:
Code: Select all
/*...block_1...*/
wxPanel *panel_main = new wxPanel(this, -1);
wxScrolledWindow *panel_1 = new wxScrolledWindow(panel, -1);
wxPanel *panel_2 = new wxPanel(panel, -1);
panel_1->FitInside();
panel_1->SetScrollRate(5, 5);
/*...block_2...*/
wxBoxSizer *vbox_main = new wxBoxSizer(wxVERTICAL);
wxBoxSizer *hbox_buttons = new wxBoxSizer(wxHORIZONTAL);
/*...block_3...*/
wxFlexGridSizer *gridsizer = new wxFlexGridSizer(1);
/*Next, the grid sizer cells are filled in line by line */
/*After being filled with xbox_buttons buttons*/
/*Now vertically group elements gridsizer and hbox_buttons*/
vbox_main ->Add(gridsizer);
vbox_main ->Add(hbox_buttons );
/*...block_4...*/
panel->SetSizer(vbox_main );
panel_1 ->SetSizer(gridsizer);
panel_2 ->SetSizer(hbox_buttons);
/*...block_X...*/
Perhaps, help to understand the situation.