Y ykucuk Well-Known Member Licensed User Longtime User Jun 3, 2024 #1 Hello, I am unable to delete a menu item in B4XPages with the following code. Can anyone identify what might be wrong? Code: Copy #if b4a Dim menus As List = B4XPages.GetManager.GetPageInfoFromRoot(Root).Parent.MenuItems menus.Clear #End If how i add menu item Code: Copy 'add menu items Dim mi As B4AMenuItem = B4XPages.AddMenuItem(Me, "Save") mi.AddToBar = True Dim ctxt As JavaObject ctxt.InitializeContext ctxt.RunMethod("invalidateOptionsMenu", Null)
Hello, I am unable to delete a menu item in B4XPages with the following code. Can anyone identify what might be wrong? Code: Copy #if b4a Dim menus As List = B4XPages.GetManager.GetPageInfoFromRoot(Root).Parent.MenuItems menus.Clear #End If how i add menu item Code: Copy 'add menu items Dim mi As B4AMenuItem = B4XPages.AddMenuItem(Me, "Save") mi.AddToBar = True Dim ctxt As JavaObject ctxt.InitializeContext ctxt.RunMethod("invalidateOptionsMenu", Null)
Erel B4X founder Staff member Licensed User Longtime User Jun 4, 2024 #2 Start with this example: https://www.b4x.com/android/forum/threads/b4x-b4xpages-menu-badges.133301/#content Upvote 0
Start with this example: https://www.b4x.com/android/forum/threads/b4x-b4xpages-menu-badges.133301/#content