Delphi popup menu?
Hi
I'm having a bit of bother with popup menu objects which are spawned by right clicking on TTreeView menu object options.
The popup menu objects are transient. As soon as you move elsewhere on the screen, they vanish, so getting much in the way of info about properties/methods on them is kind of tricky.
I can make a selection from them no problem. Right click the item in the TTreeView menu (which causes the popup menu to be generated), then "PopUpMenu" is a property of it (it being the TTreeView - I never act on the popup menu as an object in it's own right) 0and you can select from the popup using pipe separators to as many levels deep as you need. In much the same way as you select items in the TTreeView.
However, I'm struggling to find any way of doing anything other than select items as I can't spy the object to get any further detail on what, if anything, I can do with it.
CTRL+SHIFT+A in object spy does allow me to capture it. But it then immediately disappears and doesn't leave me with any useful information in the object spy details.
I've looked up the object documentation and tried a few of the properties and methods mentioned on it, but most don't work or return a dummy context menu rather than anything useful
It's these popup objects it's generating: http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/delphivclwin32/Menus_TPopupMenu.html
Debug build options are switched on for the Delphi module so I have access to all the underlying methods and properties.
Any suggestions on how to do stuff like validating that a specific menu option exists within the menu once it's brought up? It's things along those lines I'd like to do rather than just driving it blind and hoping the selections I give it (data driven test functions) are valid .....
Thanks in advance.