B4J Question MenuBar Action event works on Main form but not on other forms

ranul

Member
Licensed User
Longtime User
Hi,

I've been using a MenuBar for a long time in the Main form, with no problems.
Today I am trying to add a MenuBar to another form, which is opened from the Main form, and I don't get the MenuBar_Action event.
I have no idea why.
Am I supposed to do something different to use a MenuBar from a different form?


This is the MenuBar_Action sub. The MenuBar view is called "menu"

B4X:
Sub menu_Action
    Dim mi As MenuItem = Sender
    Dim menuOptionText As String = mi.Text
    
    If menuOptionText = "Close" Then
        frm.Close
    End If
End Sub

Thanks.
 

stevel05

Expert
Licensed User
Longtime User
It's not easy to tell without seeing the code. Can you post your project, or an example with the two forms. Other wise I would have to create one to test it and may not do it in the same way you have.
 
Upvote 0
Top