i want show a diferent menu in diferent item selected when i make
right click for example how identify when i make right click in the
root or if i select child or child-root show a diferent menu for each
how use GetSelection() method or GetRootItem()
i want use the switch cases for send each selection to diferent
function of each menui know how do that but i dont know how get the
selected item
i want show a diferent menu in diferent item selected when i make
right click for example how identify when i make right click in the
root or if i select child or child-root show a diferent menu for each
how use GetSelection() method or GetRootItem()
Did you try to read the docs or search the web?
item = treectlr.GetSelection()
if treectrl.ItemHasChildren(item):
print "Its a root node"
else:
print "Its a child node"
Cody
···
On Fri, Jan 28, 2011 at 3:24 PM, iozk_Live <iozk117@gmail.com> wrote:
Determine which item (if any) belongs the given point. The coordinates
specified are relative to the client area of tree ctrl and the where return
value is set to a bitmask of wxTREE_HITTEST_xxx constants.
···
On 1/29/11 9:41 AM, iozk_Live wrote:
Traceback (most recent call last):
File "C:\Users\Inazuma\Desktop\myfolders\DVD10\python\wxpyide\sourc
\Explorer.py", line 35, in OnRightDown
item = self.ItemHasChildren(pos)
File "c:\Python26\lib\site-packages\wx-2.8-msw-ansi\wx
\_controls.py", line 5377, in ItemHasChildren
return _controls_.TreeCtrl_ItemHasChildren(*args, **kwargs)
TypeError: in method 'TreeCtrl_ItemHasChildren', expected argument 2
of type 'wxTreeItemId const&'
this muust be works isn't?
in the docs says the the HitTest Return the item slected so
thanks i thing that i need a little rest of all of programming
thanks for all. I excuse me if i've done questions that can solve
easyly by my own, but lately I'm feeling without idea (and headaches
trying to solve this)