B4J Question [BANano]: [SOLVED] How to call different subs for different elements?

Discussion in 'B4J Questions' started by Mashiane, Jan 9, 2019.

  1. Mashiane

    Mashiane Expert Licensed User

    Hi there

    I have different subs in my code e.g.

    Code:
    public Sub gogrid_Clicked(event As BANanoEvent)
        pgGrid.Init(App)
    End Sub

    public Sub golabels_Clicked(event As BANanoEvent)
        pgIndex.Init(App)
    End Sub

    Sub gobuttons_Clicked(Event As BANanoEvent)
        pgButtons.Init(App)
    End Sub

    Sub gobq_Clicked(Event As BANanoEvent)
        pgBlockQuote.Init(App)
    End Sub
    Id like to link each to an element id of its own so that they work separately.

    Code:
    BANano.GetElement("#gogrid").HandleEvents("click", Me, "gogrid_Clicked")
    BANano.GetElement(
    "#golabels").HandleEvents("click", Me, "golabels_Clicked")
    BANano.GetElement(
    "#gobuttons").HandleEvents("click", Me, "gobuttons_Clicked")
    BANano.GetElement(
    "#gogq").HandleEvents("click", Me, "gogb_Clicked")
     
  2. Mashiane

    Mashiane Expert Licensed User

    #use of lowercase due to CaseSensitivity
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice