Home > database >  Ask: the tree control and menu events
Ask: the tree control and menu events

Time:09-27

My tree control is generated automatically follow up menu items, but how can I do click on the tree control the project in response to the click event of menu objects in the project? For example, a project in the tree control is "basic data" corresponds to the main window menu of "basic data", how can I do it and then click on the "basic data" within the tree control project as clicking the menu of "basic data" open the corresponding basic data window?
Also hope you good friend can teach me, thank you!!!!!

CodePudding user response:

Tree control click

Tree is defined, the current label value
Methods a little...

The integer I, j
For I=1 to upperbound (parent) menuid) item)
For j=1 to upperbound (parent) menuid) item [I] item)
If the parent. Menuid. Item [I] item [j]. Journal of text=tags value then
Parent. Menuid. Item [I] item [j]. Journal of postevent (clicked!)
The exit
End the if
Next
next

CodePudding user response:

Don't know this idea is not line, haven't tested:
TV control Treeviewitem item data property is any value,
Of course can also be a menu...

Click on the items, the menu, and then trigger the clicked!
  • Related