I have a main menu with 2 menu buttons - settingBtn and featurBtn. vbf is the main form.
I try to click the settingBtn button in main menu, open the setting Form, do something, click the featureBtn in main menu, and open the featureForm by codes.
vbf.getToolbar().openSideMenu();
timer = UITimer.timer(200, true, ()->{
if (vbf.getToolbar().isSideMenuShowing()){
Component cp = vc.settingBtn;
System.out.println(cp.getParent().getClass().getName());
Dialog dlg = new Dialog("settingBtn Clicked");
dlg.showPopupDialog(cp);
vbf.getToolbar().closeSideMenu();
timer.cancel();
}
});
vbf.getToolbar().openSideMenu();
cmp = vc.featureBtn;
Dialog dlg = new Dialog("featureBtn Clicked");
dlg.showPopupDialog(cp);
vbf.getToolbar().closeSideMenu();
The program has issues:
dlg.ShowDialog(cp)won't show at the position of the buttons if the buttons are in the main menu. It always show at the left-top of main menu.- The process keeps opening and closing the menu many times. I can't put all the code in UITimer. Because a UI timer is only for one time opening sidemenu.
Component Hierarchy in the inspector

The
openSideMenu()call is asynchronous since there's an animation involved. You started that animation yet disposed the menu before it had the chance to show up.Unfortunately, at the moment there's no way to get an event when the side menu actually shows up. However, I added the following call to
Toolbar:boolean isSideMenuShowing()as part of this commit.You can use a timer and wait for this method to return true at which point you can continue with the logic of the walk through tour. This commit should become a part of the release on January 12th 2024.
E.g.: