Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   GUI TextEdit problem (https://forums.graalonline.com/forums/showthread.php?t=134268837)

Stowen 10-16-2013 11:32 PM

GUI TextEdit problem
 
Okay, so I'm creating a GUI with a text edit box. I wanted the box to be limited to numbers only, and I was under the impression that numbersonly = true; would make that happen. Turns out, it doesn't do anything at all, really. Anybody else have this issue?

cbk1994 10-16-2013 11:44 PM

try
PHP Code:

useOwnProfile true;
profile.numbersOnly true


fowlplay4 10-17-2013 12:09 AM

or write your own:

PHP Code:

function TextEditControl.onTextChanged() {
  
temp.valid "1234567890";
  for (
temp.0temp.TextEditControl.text.length(); temp.i++) {
    
temp.TextEditControl.charat(temp.i);
    if (
temp.valid.pos(temp.c) >= 0temp.str @= temp.c;  
  }
  
TextEditControl.text temp.str;



Stowen 10-17-2013 12:27 AM

Thanks guys, much appreciated.

Both of them worked as well as expected.


All times are GMT +2. The time now is 03:22 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.