0

I have an Edit Text box, with the Input Type set to DECIMAL_NUMBERS. I have declared a global Int that I want to add the value entered in the edit text box to.

I have generated an EnterPressed member for the Edit Text box, but don't know how to access the value entered in the box so I can use it.

Also, do I need to clear the box manually? If so, how do I do that?

Small steps, big journeys. :)

Edit:

Okay, your doofus alarms must have being going off there. :)

It turns out that to get the value from an Edit Text box called eg MyNumber, all I need to do is access MyNumber.Text

Also to clear the box, MyNumber.Text = "" after retrieving the value entered works.

Ahem. :)

César
  • 9,939
  • 6
  • 53
  • 74
PaulR
  • 706
  • 9
  • 27
  • Do you want to get value of Edit text? user input? – Alex Oct 23 '11 at 12:23
  • You can use IsNumber to check whether a string can be parsed as a number. In your case it is less important as you set the input type to decimal numbers (though empty string will cause an error if you are not checking it). – Erel Oct 23 '11 at 12:28
  • Thanks Erel, I came across that shortly afterwards. :) – PaulR Oct 23 '11 at 21:28

0 Answers0