B4J Question [abmaterial]abmlabel click event

Discussion in 'B4J Questions' started by Hanz, Jan 4, 2019.

  1. Hanz

    Hanz Member

    Hello,

    Is there a way to click an abmlabel like a button? For instance a label is a name of a person and if you click it you get a person's profile.

    Thanks.
     
  2. Harris

    Harris Well-Known Member Licensed User

    Good question...

    ABMLabel has no events to raise (currently)...
    https://www.b4x.com/b4j/help/abmaterial.html#abmlabel

    I see where you are coming from thou... I use labels - in Android (B4A) - and it's click event - like a button...

    Before all those smart folks determined that any view object could have events, I guess, no one assumed a Label could be clicked on (why?). That's a button's job...
    However, someone in our B4X community dev group thought otherwise... guess who (brings us this wonderfulness)...

    I suggest you add it, as a request to feedback ( feature / upgrade / wish ) - else - use a button (disguised as a label) in the interim.
     
  3. Hanz

    Hanz Member

    Thanks for the reply. There is a click event for the abmlabel. I found it after I posted the question. I did not see it at first because I used different key words and looked at the Demo w/c does not show how to do it. But there is. It was posted by allain.
     
  4. alwaysbusy

    alwaysbusy Expert Licensed User

    ABMLabels are by default not clickable, so you have to explicitly tell it by setting the Clickable to true:

    Code:
    Lbl.Clickable=true
    Now the lbl_clicked event will be raised.
     
    Joan Paz and DonManfred like this.
  5. Harris

    Harris Well-Known Member Licensed User

    Well hells bells...
     
    alwaysbusy likes this.
  6. Harris

    Harris Well-Known Member Licensed User

    I know you have stated this (AMBLabel) in the past, but where in our limited gray matter do we store this tidbit?
    Unfortunately, we do not have the photogenic mind of Erel (and you).

    This is where Search comes to play... (helpful... sometimes not)...
     
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