[wxPython-users] Re: Question about Grid or events ?
Hugues JEAN-BAPTISTE
hjb at agorinfo.fr
Thu Aug 9 02:05:26 PDT 2007
Christian K a écrit :
> Robin Dunn wrote:
>
>> Hugues JEAN-BAPTISTE wrote:
>>
>>> I have tested the next :
>>>
>>> def OnBtVal(self, evt) :
>>> for row in range(gr.GetNumberRows()) :
>>> wx.CallAfter(self.ProcRow, row)
>>> def ProcRow(self, row) :
>>> Do manythings ....
>>> gr.SetValue(row, col, 'Row finished ...')
>>> gr.Refresh()
>>> wx.Yield()
>>>
>>>
>
> You've got still a CallAfter there.
>
> try something like this:
> def OnBtVal(self, evt) :
> for row in range(gr.GetNumberRows()) :
> gr.SetValue(row, col, 'Row finished ...')
> gr.Refresh()
> wx.Yield()
>
> If it doesn't work, it'll require more work. Have look at the link Robin sent you.
>
> Christian
>
Thank you a new time to Christian and Robin for help.
What effectiveness on this mailing-list !... =-O
I do exactly the next and it's work *perfectly :*
def OnBtVal(self, evt) :
# wx.BeginBusyCursor()
for row in range(gr.GetNumberRows()) :
wx.BeginBusyCursor()
self.ProcRow(row)
wx.EndBusyCursor()
# wx.EndBusyCursor()
def ProcRow(self, row) :
Do manythings ....
gr.SetValue(row, col, 'Row finished ...')
gr.Refresh()
wx.Yield()
The wx.Yield disturbed my busy cursor, so I need to start and stop it
for each row !
--
Hugues JEAN-BAPTISTE (hjb at agorinfo.fr)
AGORINFO S.A.S. (http://www.agorinfo.fr)
More information about the wxpython-users
mailing list