I am working on a soure code with TreeView component and with dynamically changing PopupMenu for this TreeView files and folders. However, I am required to change this Popupmenu with a 3d party Popupmenu with more fetaures and customization. I was able to replicate all previous Popupmenu Items onto the new one but the new 3rd party Popupmenu still lacks the basic (enabling/disabling menuitem) options for TreeView items.
I am unable to find information in source code to enable/disable menuitems on new Popupmenu for certain events for TreeView files/folders or even dynamically appearing new popupmenu-items for TreeView-items.
For example: for a TreeView item 'A' right clicking it displays Popupmenu with options (A and B) where 'A' is disabled (to select) and 'B' is enabled. But on new popupmenu both (A and B) are enabled all the time.