Announcement

Collapse
No announcement yet.

How to create a Virtual Keyboard to write in a Label

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • mahdishams
    replied
    Hi all
    i write simple calculator that bind to keyboard
    i hope it is useful for you
    Calculator.apz

    Leave a comment:


  • colc
    replied
    Hi did you download example?
    Here is example code for button "1" hotspot

    Code:
     [FONT=Courier New]01  [I]--this is numeral[/I]
    02  snum= "1"
    03  
    04  tnum = Label.GetText( "Label1");
    05  [I]--if no number entered then set as first number[/I]
    06  [B]if[/B] tnum == "Enter Password" [B]then[/B]
    07  
    08  Label.SetText( "Label1", snum);-- <-- use set text for variable snum which is 1
    09  [B]else[/B]
    10  [I]--if number already then add / concat number[/I]
    11  Label.SetText( "Label1",tnum..snum);
    12  [B]end[/B]
    13  [I]--note this is same for all numerals[/I][/FONT]
    try copying code to your project or upload your project using export
    Cheers

    Leave a comment:


  • LukasCSGO
    replied
    No problem, I tried this way:

    result = Paragraph.GetText("Paragraph1"); --To get what is already inside the Paragraph

    Paragraph.SetText("Paragraph1", result .. "9"); --To set text with the variable "result" and the text "9" (this was "9" button)

    I didn't know I could set text with Variable and even with a random text xD

    Leave a comment:


  • colc
    replied
    hi found this among my archives,may help
    keypad.apz

    Leave a comment:


  • LukasCSGO
    replied
    How to add something to a label? I can only see the Label.SetText command

    Leave a comment:


  • Ulrich
    replied
    If this keypad was made with buttons, then on each On Click event, you would add the corresponding number at the end of the current string.

    If this keypad was made with individual images, you can build buttons from then, using the Button Maker.

    If you do not want to create buttons, or this is a single image, then use hotspots for each region. Again, in the On Click event of each hotspot, modify the string with the current value as desired, adding, removing, or clearing the content.

    Update the label with the new content after each action, so you can see the current number.

    Ulrich

    Leave a comment:


  • Alain
    replied
    helllo Lukas
    I do not understand very well your problem.....

    Leave a comment:


  • How to create a Virtual Keyboard to write in a Label

    Guys, I created a numeric Keyboard (0-9) and I want to write numbers in a label. I hope you understand me.
    Check the pic I uploaded to understand me better. Sorry for my bad english :(

Working...
X