B4J Question Underscore in Button Text

Discussion in 'B4J Questions' started by charlesg, Jan 18, 2015.

  1. charlesg

    charlesg Member Licensed User

    I can cope with the code for ALT-A shortcut on a button (see png)

    I would be grateful if somebody could help with putting the <underscore>A in the button text.

    Thanks
     

    Attached Files:

  2. Erel

    Erel Administrator Staff Member Licensed User

    You can use this sub:
    Code:
    Sub DisableMnemonicParsing(b As Button)
       
    Dim jo As JavaObject = b
       jo.RunMethod(
    "setMnemonicParsing"Array(False))
    End Sub
     
  3. charlesg

    charlesg Member Licensed User

    Couldn't really get what I wanted so I did what any programmer would do: I cheated. I drew up some buttons in Inkscape (see svg file in files) and exported them individually to png. Faked a button in B4J with an ImageView and it does all I want. The ImageView cannot accept focus but this is not a problem for me as I hate the <tab> key. It is the enemy of fast data entry.
     

    Attached Files:

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