[wxPython-users] can't find any docs on wx.grid, any suggestions?

C M cmpython at gmail.com
Sun Sep 2 12:26:53 PDT 2007


I'll take a stab at this though I am early in my understanding...

I am trying to look for some docs explaining basic usage of the grid
> control.


Well, first, have a look at the demo for wx.grid.  The demo is always
where you want to look first to see more or less what a control is
for or capable of.

firstly, if I can put combo boxes, list boxes and buttons inside a
> grid how different is it from a gridbag or a flexgrid layout?


gridbagSizer and flexGridSizer are sizers, not controls.  They just
handle the sizing of controls, not actually do anything else.  Might
want to read up on sizers.  You can put controls like comboboxes
inside grids, and there is an example of that in the demo; it requires
use of a cell renderer.  Buttons may be another matter, though.
As far as I understand, it is not really all that easy to put buttons
in the grid itself (though it can be done in a roundabout way...
and if there is a straightforward way, could someone indicate it?)
but you could do it.


> secondly, what are the main methods and properties of the grid which I
> can use to create a spreadsheet like interface with labels at the top
> of the columns as column headers and textboxes for the data?


Again, see the demo, it'll all be clear.  Second, here is a list of the
various
functions that grid has:

http://www.wxwidgets.org/manuals/2.6/wx_wxgrid.html

(usually just Googling the control's name, like wxGrid, pulls
up these pages)

and lastly which layout should be possibally used for putting this
> grid on a frame followed by a horizontal line of buttons below the
> grid?


Multiple choices.  You could put a vertical boxSizer and then in
the second position of that put a flexgrid sizer with multiple positions
for the buttons, something like that?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200709=
02/c1bcecf9/attachment.htm


More information about the wxpython-users mailing list