Hi,
How can i remove current selection in a listctrl?
I tried :
MyListCtrl.Select(None)
MyListCtrl.Select(-1)
Thx
Hi,
How can i remove current selection in a listctrl?
I tried :
MyListCtrl.Select(None)
MyListCtrl.Select(-1)
Thx
I do it this way:
def OnItemSelected(self, event):
event.Skip()
self.currentItem = event.GetIndex()
MyListCtrl.SetItemState(self.currentItem, 0, wx.LIST_STATE_SELECTED)
Werner
On 28/10/2010 14:41, Christian D�molis wrote:
Hi,
How can i remove current selection in a listctrl?
I tried :
MyListCtrl.Select(None)
MyListCtrl.Select(-1)
I’ve attached a slightly different version that uses the Select method.
listctrl-ex3.py (1.79 KB)
On Thu, Oct 28, 2010 at 8:40 AM, werner wbruhin@free.fr wrote:
On 28/10/2010 14:41, Christian Démolis wrote:
Hi,
How can i remove current selection in a listctrl?
I tried :
MyListCtrl.Select(None)
MyListCtrl.Select(-1)
I do it this way:
def OnItemSelected(self, event): event.Skip() self.currentItem = event.GetIndex()
MyListCtrl.SetItemState(self.currentItem, 0, wx.LIST_STATE_SELECTED)
Werner
Mike Driscoll
Thx
I made a method who deselect all
for x in xrange(0, liste.GetItemCount(), 1):
liste.Select(x, on=0)
2010/10/28 Mike Driscoll mike@pythonlibrary.org
On Thu, Oct 28, 2010 at 8:40 AM, werner wbruhin@free.fr wrote:
On 28/10/2010 14:41, Christian Démolis wrote:
Hi,
How can i remove current selection in a listctrl?
I tried :
MyListCtrl.Select(None)
MyListCtrl.Select(-1)
I do it this way:
def OnItemSelected(self, event): event.Skip() self.currentItem = event.GetIndex()
MyListCtrl.SetItemState(self.currentItem, 0, wx.LIST_STATE_SELECTED)
Werner
I’ve attached a slightly different version that uses the Select method.
–
Mike Driscoll
–
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en