Context Menu and Tree View.

RandomCoder

Well-Known Member
Licensed User
Longtime User
Is it possible to add a context menu to a tree view?

My tree view control is on a panel, on the desktop I can add the context menu to the panel and it works OK.
But on the device the tree view blocks the context menu (as documented in the help file).
Adding the context menu to the tree view gives the error message shown in the attachment....

If this is not possible at this time, will it be added in the future?

Thanks,
RandomCoder
 

Attachments

  • Error Msg.png
    Error Msg.png
    5.9 KB · Views: 136

RandomCoder

Well-Known Member
Licensed User
Longtime User
You should use the ControlRef property to pass a library control to a library method.
Try:

FrmLibMain.Add(TreeViewInbox.ControlRef,...)

I'm not sure that I completely understand as I'm still unable to make this work.
Using Msgbox( TreeViewInbox.ControlRef ) returns nothing after the treeview has been created :confused:

Regards,
RandomCoder
 

RandomCoder

Well-Known Member
Licensed User
Longtime User
It's working

Fantastic!
Thanks Erel, it works perfectly.

My mistake was that in your first post you said to try FrmLibMain.Add(TreeViewInbox.ControlRef,...)
when infact I actually needed FrmLibMain.AddContextMenu(TreeViewInbox.ControlRef ,...) as pointed out in your last post.

Kind Regards,
RandomCoder
 
Top