Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

'Typecasting' to menu

Status
Not open for further replies.

2good2btru

Programmer
May 1, 2001
17
AE
I have converted one of my main menu item which had about 200 submenus into a treeview, the idea is to open the window which opened on the click of the menu item on the click of the treeview item, i am storing the menu item name as the treeviewitem data...
now i can easily trace back the entire menu structure by looping with finditem(parentreeitem!,...) so that i would finally get m_1.m_2.m_3.m_4. etc.......
But all this in a string format.... can i finally typecast or make it bahave like a menu object , so that i can trigger its clicked event..........
Ofcourse, the other way would be to loop through the menu for the particualr name and fire the clicked event, just wanted to avoid the processing if the earlier logic is feasible....
help me out.......
 
hi
prob solved

i attached the menu object to the treeview item , declared a menu type variable and assigned the data to this variable. When the user double-clicked the item i assigned the object to the variable and called its event clicked!

the solution was simpler than i thought.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top