I want the item to be selected on right click. I tried calling
SelectItem manually. But it is not working
it not finding the item . what am i doing wrong?
def OnTreeListCtrl1TreeItemRightClick(self, event):
pt=self.treeListCtrl1.ScreenToClient(wx.GetMousePosition())
item, flags,column = self.treeListCtrl1.HitTest
(wx.GetMousePosition())
if item:
self.treeListCtrl1.SelectItem(item)
else:
print "no item found"
self.treeListCtrl1.PopupMenu(self.menu1)
event.Skip()
On Nov 25, 6:00 pm, thomas <tctho...@gmail.com> wrote:
Hi All,
I want the item to be selected on right click. I tried calling
SelectItem manually. But it is not working
it not finding the item . what am i doing wrong?
def OnTreeListCtrl1TreeItemRightClick(self, event):
pt=self.treeListCtrl1.ScreenToClient(wx.GetMousePosition())
item, flags,column = self.treeListCtrl1.HitTest
(wx.GetMousePosition())
if item:
self.treeListCtrl1.SelectItem(item)
else:
print "no item found"
self.treeListCtrl1.PopupMenu(self.menu1)
event.Skip()
On Nov 26, 1:04 pm, michael h <michaelke...@gmail.com> wrote:
Simple, just use:
self\.treectrl\.SelectItem\(event\.GetItem\(\)\)
Let me know if you have any other problems
michael
On Nov 25, 6:00 pm, thomas <tctho...@gmail.com> wrote:
> Hi All,
> I want the item to be selected on right click. I tried calling
> SelectItem manually. But it is not working
> it not finding the item . what am i doing wrong?