Using Dynamically Created Menus
Posted: Wed Sep 28, 2016 7:40 am
I have created a push button that has a popup menu that has dynamically created menu items and also a dynamically created submenu.
There are some things I can do so as a test I set up something similar that doesn't use dynamic creation to verify it has nothing to do with building the menu system dynamically. Here are my issues.
1. I want to allow the user to click on a menu item that has a submenu and have it handle the click event instead of showing the submenu. The submenu will only appear if you hover. This doesn't appear to work. Is there a work around to this or a property I can set to make this functionality available.
2. It seems like you have to set the height of the popup menu because LANSA doesn't automatically size the popup menu to fit all the menu items. The propery MenuSizing is available but it won't let me select Popup. It just goes back to None. I tried setting the Size to Content Width and Height. The height got sized correctly, but it makes the width too small. So I supposed the answer is to just set the appropriate width and then set the size to Content Height. Any thoughts?
There are some things I can do so as a test I set up something similar that doesn't use dynamic creation to verify it has nothing to do with building the menu system dynamically. Here are my issues.
1. I want to allow the user to click on a menu item that has a submenu and have it handle the click event instead of showing the submenu. The submenu will only appear if you hover. This doesn't appear to work. Is there a work around to this or a property I can set to make this functionality available.
2. It seems like you have to set the height of the popup menu because LANSA doesn't automatically size the popup menu to fit all the menu items. The propery MenuSizing is available but it won't let me select Popup. It just goes back to None. I tried setting the Size to Content Width and Height. The height got sized correctly, but it makes the width too small. So I supposed the answer is to just set the appropriate width and then set the size to Content Height. Any thoughts?