Hi there,
I have a frame (wxFrame) and a canvas (wxVScrollWindow) attached to that frame. For that canvas I make a grid sizer (one of the standard grid sizers), and with that sizer I add some controls (actually, buttons) to that canvas. So, I just call the
wxSizerItem* Add(wxWindow* window, const wxSizerFlags& flags)
method of the sizer to add new items on the canvas.
The problem is that the sizer (I actually tried all of the grid sizers) just put the items in a huge single row -- no matter what the with of the canvas is. I know I can specify the number of columns per a row for the wxGridSizer, but what if I don't that number of columns? I mean, what I need is the sizer to decide what number of columns fits in the window's width and then determine the number of rows and then locate my items respectively.
So, the question is: do I need to write my own sizer? Or, is there a way I can just add my items to the sizer so it will compute the number of columns by itself?
Thanks!