I'll try to put one together in the morning. Unfortunately, the code is
unwieldy due to changing requirements, so it will take me a while.
Mike
···
-----Original Message-----
From: C M [mailto:cmpython@gmail.com]
Sent: Tuesday, November 06, 2007 4:06 PM
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] Updating a wx.Grid from SQL ServerOn 11/5/07, Mike Driscoll <mdriscoll@co.marshall.ia.us> wrote:
Hi,
I have a wx.Grid object that is displaying a user's
hours per pay period
by accessing data stored in SQL Server. What I would
like to be able to do
is allow the user to click some buttons labeled Next
and Prev to go to the
next or previous pay period and display those hours.
Unfortunately, the
number of rows change between pay period for this
particular type of user
and I cannot get the grid to change accordingly.
If I create the entire frame from scratch, it works
great. But I would
like to just update the grid object. I tried destroying
the grid and then
recreating it, but the grid doesn't seem to get
re-added to my sizer, so
it's "smushed" up in the corner of the frame. How do I
re-add it to the
sizer at the correct place? Is there a better way then
destroying it?Could you post a small runnable sample?