HI
I have the same trouble. I can show the grid in a separate window but
not on my frame. Can someone tell me how to put a grid on a frame?
Regards
Greg
···
-----Original Message-----
From: Luke Tunmer [mailto:luke.tunmer@trigenix.com]
Sent: Monday, 8 September 2003 10:38 PM
To: wxPython-users@lists.wxwindows.org
Subject: Re: [wxPython-users] wxCalendarCtrl And wxGrid
Deane Venske wrote:
Hi Stefi,
I'm extremely new to wxPython (My First week). But I'm playing with
grids
and as far as I can see a grid needs to have a wxFrame as it's parent.
I
can't get it working on anything by the actual window frame. I think
that's
why the demo opens up new windows. Though I'd like to find out from
everyone
if there is a way around this. I'd like to have grids for user lists
etc. on
my panels and the like.
Regards,
Deane Venske
Deane,
You don't say what in particular doesn't work for you, or what the
parent of your wxGrid is, but I suspect that it might be resize problems
that you are having, and so our experience might be relevant here. We
had a grid in a panel in a notebook in a splitter in another splitter in
a frame (or something like that), and we had resize problems
particularly as rows or columns were added to or removed from the grid.
Some of the resize problems were quite spectacular - the grid drew
outside of the area that its sizer had clearly allocated for it!
To fix it we simply forced the sizer to re-layout whenever we changed
the number of rows or columns in the grid. In our class derived from
wxGrid, we do the following whenever its data changes:
self.GetParent().GetSizer().Layout()
It now works perfectly.
Now, *my* irritant with wxGrid is that you can't append columns and then
set column headers when you have zero rows - but I shall open this issue
in another thread
Cheers,
Luke
-------
Luke Tunmer
Trigenix Ltd
http://www.trigenix.com
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail:
wxPython-users-help@lists.wxwindows.org
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org