B4J Question Button with image

Discussion in 'B4J Questions' started by alfonsorento, May 10, 2015.

  1. alfonsorento

    alfonsorento Member

    I want to put an image into a button in B4J.
    How can I do it?
  2. Erel

    Erel Administrator Staff Member Licensed User

    You can use this code to add an ImageView to a button:
    Sub SetGraphic(Btn As Button, Graphic As Node)
    Dim jo As JavaObject = Btn
    End Sub

    Dim iv As ImageView
    File.DirAssets, "EffectNone.png"))
    SetGraphic(button1, iv)
    BeneBarros likes this.
  3. alfonsorento

    alfonsorento Member

    Thank you Erel. You are the best!
  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