Simple question and I feel really dumb for not knowing how to do it:
How can I make it so that the numerical values a user types into a TextField are turned into a integer property?
Obviously, I make the property, but what code do I enter into the TextField to make the value a property. Currently, I have the following on the TextField:
KeyDown:
[code] Dim skipKey As Boolean = True // Skip all keys by default
// Allow these keys
If Key >= “0” And Key <= “9” Then skipKey = False
If Key = “.” Then skipKey = False
If Key = Chr(8) Then skipKey = False ’ BackSpace
If Key = Chr(4) Then skipKey = False ’ End
If Key = Chr(1) Then skipKey = False ’ Home
If Key = Chr(127) Then skipKey = False ’ Delete
If Key = Chr(28) Then skipKey = False ’ Left arrow
If Key = Chr(29) Then skipKey = False ’ Right arrow
If Key = Chr(9) Then skipKey = False ’ Tab
Return skipKey[/code]
TextChange:
changed = true//the text has been changed
if me.text <> "" then
textEntered = true//text has been entered
end
Thank you so much for your assistance.