Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-16-2013, 11:32 PM
Stowen Stowen is offline
Graalian since '01
Join Date: Sep 2005
Location: Massachusets, USA
Posts: 156
Stowen will become famous soon enough
Send a message via AIM to Stowen Send a message via MSN to Stowen
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?
__________________
Quote:
Originally Posted by Felix_Xenophobe View Post
He is no carpenter's son but Stowen will breathe life into pc graal.
Unholy Nation is my home.
Reply With Quote
  #2  
Old 10-16-2013, 11:44 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
try
PHP Code:
useOwnProfile true;
profile.numbersOnly true
__________________
Reply With Quote
  #3  
Old 10-17-2013, 12:09 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
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;

__________________
Quote:
Reply With Quote
  #4  
Old 10-17-2013, 12:27 AM
Stowen Stowen is offline
Graalian since '01
Join Date: Sep 2005
Location: Massachusets, USA
Posts: 156
Stowen will become famous soon enough
Send a message via AIM to Stowen Send a message via MSN to Stowen
Thanks guys, much appreciated.

Both of them worked as well as expected.
__________________
Quote:
Originally Posted by Felix_Xenophobe View Post
He is no carpenter's son but Stowen will breathe life into pc graal.
Unholy Nation is my home.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:59 AM.


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