View Single Post
  #1  
Old 01-11-2012, 04:42 AM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
Question regarding GuiTextEditCtrl

Basically I am working on a trade system.
I want to make it so that if you enter a character that isn't a number it will remove it. I have made the detection weather it is a number or not but how would I remove the last character of the textedit control?
I have tried a few things, such as:
PHP Code:
Trade_MyGralats.text.length() -= 1;
Trade_MyGralats.text.size() -= 1;
Trade_MyGralats.text -= 1
But none of them work, Thanks in advanced.
I was also thinking maybe it would have something to do with .pos() Not sure though.
Maybe this is an idea for a future improvement for text controls.
PHP Code:
allowedcharactersonly true;
allowedcharacters= { "a""b""c" }; 
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote