Is side menu open?

34 views
Skip to first unread message

Ivan

unread,
Nov 30, 2020, 6:49:36 PM11/30/20
to CodenameOne Discussions
Hi guys,
how can I find out thar left side menu is open ?
I tried isMenuOpen, isMenuShowing on Form.gerToolBar().getMenuBar() but nothing works for me. The only solution was to check if sideMenuDialog exists in form's component tree, but it's really ugly solution.
Thanks
Ivan

Shai Almog

unread,
Nov 30, 2020, 9:53:26 PM11/30/20
to CodenameOne Discussions
Hi,
I thought we have an API for that but we don't. These are old APIs from previous iterations of menus. What are you trying to accomplish that requires this API?

Ivan

unread,
Dec 1, 2020, 3:02:30 AM12/1/20
to CodenameOne Discussions
Hi,
I'm implementing back command for soft key (back) on main form of application and when the menu is open the back command should close it otherwise it shlould exit the application.

Dátum: utorok 1. decembra 2020, čas: 3:53:26 UTC+1, odosielateľ: Shai Almog

Shai Almog

unread,
Dec 1, 2020, 10:23:56 PM12/1/20
to CodenameOne Discussions
Hi,
this should be the default behavior of the menu back command. At least historically I think we had some code to deal with folding the menu when the back command was pressed, we should probably update that.

Ivan

unread,
Dec 2, 2020, 2:03:09 AM12/2/20
to CodenameOne Discussions
Hi, that would be nice :)

Dátum: streda 2. decembra 2020, čas: 4:23:56 UTC+1, odosielateľ: Shai Almog
Reply all
Reply to author
Forward
0 new messages