![]() |
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:
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:
|
PHP Code:
PHP Code:
PHP Code:
|
Ahok. So when there is a keydown if they don't press a letter save temp.text, then if they press a letter change the text to temp.text, shoulda thought of that, thanks.
|
the real solution though is to just have the guitexteditctrl use its own profile and change profile.numbersonly to true.
|
O_o That seems a lot simpler.
Does it allow to copy and paste though? Because I didn't want to allow copy and pasting. |
| All times are GMT +2. The time now is 11:58 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.