Search found 9 matches

by Dobias
Mon Sep 21, 2009 12:27 pm
Forum: Component Writing
Topic: wxGrid + wxButton in wxFlexGridSizer
Replies: 16
Views: 6752

It seems like the verticalBoxSizer->Add( grid, 1, wxEXPAND ) overwrites the grid->SetMaxSize when resizing the window. The grid is stretched so that the white Space is still there. Unfortunately, there is no "wxFIXED_MAXSIZE" that i could use instead of wxEXPAND. There only is a wxFIXED_MI...
by Dobias
Thu Sep 17, 2009 1:41 pm
Forum: Component Writing
Topic: wxGrid + wxButton in wxFlexGridSizer
Replies: 16
Views: 6752

Thanks.
The sizers-and-spacers-solution would be to nest the grid into spacers so that when the window grows the grid takes its optimal size as soon as posible but further space will be given to the spacer aside. But I don't know if this is actually possible. ;-)
by Dobias
Thu Sep 17, 2009 11:06 am
Forum: Component Writing
Topic: wxGrid + wxButton in wxFlexGridSizer
Replies: 16
Views: 6752

Ok, now i have #include "wx/wx.h" #include "wx/grid.h" class MyApp: public wxApp { virtual bool OnInit(); }; class MyFrame: public wxFrame { public: MyFrame( const wxString& title, const wxPoint& pos, const wxSize& size ); }; IMPLEMENT_APP(MyApp) bool MyApp::OnInit() ...
by Dobias
Thu Sep 17, 2009 7:54 am
Forum: Component Writing
Topic: wxGrid + wxButton in wxFlexGridSizer
Replies: 16
Views: 6752

I've reduced the problem to a minimal example to make things easier. It looks like this: #include "wx/wx.h" #include "wx/grid.h" class MyApp: public wxApp { virtual bool OnInit(); }; class MyFrame: public wxFrame { public: MyFrame( const wxString& title, const wxPoint& po...
by Dobias
Wed Sep 16, 2009 12:03 pm
Forum: Component Writing
Topic: wxGrid + wxButton in wxFlexGridSizer
Replies: 16
Views: 6752

I'm very sorry, but LoadGrid->AutoSizeColumns( false ); wxBoxSizer* horizontalBoxSizer = new wxBoxSizer( wxHORIZONTAL ); horizontalBoxSizer->Add( Button1, 1 ); horizontalBoxSizer->Add( Button2, 1 ); horizontalBoxSizer->Add( Button3, 1 ); horizontalBoxSizer->Add( Button4, 1 ); wxBoxSizer* verticalBox...
by Dobias
Wed Sep 16, 2009 11:48 am
Forum: Component Writing
Topic: wxGrid + wxButton in wxFlexGridSizer
Replies: 16
Views: 6752

Ok, now i have LoadGrid->AutoSizeColumns(); wxBoxSizer* horizontalBoxSizer = new wxBoxSizer( wxHORIZONTAL ); horizontalBoxSizer->Add( Button1, 1 ); horizontalBoxSizer->Add( Button2, 1 ); horizontalBoxSizer->Add( Button3, 1 ); horizontalBoxSizer->Add( Button4, 1 ); wxBoxSizer* verticalBoxSizer = new ...
by Dobias
Wed Sep 16, 2009 11:04 am
Forum: Component Writing
Topic: wxGrid + wxButton in wxFlexGridSizer
Replies: 16
Views: 6752

Thank you. That is better but still not perfect. The good thing is, that the buttons stay visible now when the grid is forced to have scrollbars. http://i32.tinypic.com/30w70w1.png The drawback is, that the unused space is filled with white color (which i guess comes from the grid. http://i28.tinypi...
by Dobias
Wed Sep 16, 2009 6:48 am
Forum: Component Writing
Topic: wxGrid + wxButton in wxFlexGridSizer
Replies: 16
Views: 6752

Hi Auria, thank you for the suggestion, but i can't get your version to work either. Not it looks like this: http://i29.tinypic.com/6rlmki.png My code in the constructor of my wxPanel-child-class now looks like this: wxBoxSizer* horizontalBoxSizer = new wxBoxSizer( wxHORIZONTAL ); horizontalBoxSizer...
by Dobias
Tue Sep 15, 2009 9:42 am
Forum: Component Writing
Topic: wxGrid + wxButton in wxFlexGridSizer
Replies: 16
Views: 6752

wxGrid + wxButton in wxFlexGridSizer

Hello dear Community, 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...