problem)
you have to run EnsureVisible() after the default event handler
finished (after sorting). But I don't know how can you do that..
I have the "same" problem, I made cycled background colors
for the rows, but the sorting fucks up everything
umm... and don't forget that the user can select multiple rows;)
rH`
···
On Wed, 20 Oct 2004, Tertius Cronje wrote:
Hi,
I use wxColumnSorterMixin in my wxListCtrl and it works
well.
When sort on a colmn the current highlighted row disapears.
Where can I use listCtrl1.EnsureVisible() to ensure that
my curren colmn stays visible after a sort ? Is there maybe
an even that gets triggered ?
and
def FirstVisibleSelected( self ):
visibleIdx = listCtrl1.GetTopItem()
if not listCtrl1.GetItemState( visibleIdx,
wx.LIST_STATE_SELECTED ):
visibleIdx = listCtrl1.GetNextItem( visibleIdx,
wx.LIST_NEXT_ALL,
wx.LIST_STATE_SELECTED )
return visibleIdx
problem)
you have to run EnsureVisible() after the default event handler
finished (after sorting). But I don't know how can you do that..
I have the "same" problem, I made cycled background colors
for the rows, but the sorting fucks up everything
Move your colorizing code to a separate method
(if it isn't already) and call it via wx.CallAfter.
umm... and don't forget that the user can select multiple rows;)
HTH.
- Sam
···
__________________________________________________________
Spinward Stars, LLC Samuel Reynolds
Software Consulting and Development 303-805-1446 http://SpinwardStars.com/ sam@SpinwardStars.com
Use wx.CallAfter to cause it to be called as soon as current and pending events are completed.
Thanks
The information transmitted is only to be viewed or used by the person/s or entity to which it is addressed and may contain confidential and/or privileged material/information. Internet Filing Pty Ltd, trading as Interfile reserves the copyright to all contents of Interfile information contained in e-mail messages. The views and opinions expressed in this transmission are those of the sender and do not necessarily represent the views and opinions of Interfile. Interfile cannot assure that the integrity of this communication has been maintained nor that it is free from errors, malicious code, interception or interference. Under no circumstances will Interfile or the sender of this e-mail be liable to any party for any direct, indirect, special or other consequential damages from any use of this e-mail.