Posted: Sun Jan 17, 2016 7:43 pm Post subject: How would I manage to do this?
I have a textbox, and want to display it onto a textlabel... but there are a few questions I have first
1. Is there a way so that I can make it so the value in the textbox are ONLY aloud to be integers?
2. I'm trying to make it so that if the number entered into the textbox is greater than 100 then make the textlabel say "over 100"... but we all know you cant add inequalities to text, because text can't be measured.
The easiest way I can think of only allowing integers in the textbox is to lex/parse the input string in the OnChange property of the Edit class object for the textbox and make modifications to it from that. For example, here's a quick and dirty way of doing it:
Code:
function CEEdit1Change(sender)
sender.Text = math.floor(tonumber(sender.Text) or 0)
end
_________________
I don't know where I'm going, but I'll figure it out when I get there.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum