Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / blue gui- need edit boxes that return integers

Author
Message
The thing
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location: Somewhere in the U.K
Posted: 5th Mar 2005 02:41
I got blue gui not so long ago and I am creating a level editing program. I have finished all the menu systems and was about to start coding the rest of the program when I discovered that the edit boxes only seem to return strings. However I need the edit boxes to return integers.

C.M.M
IanG
20
Years of Service
User Offline
Joined: 25th Sep 2004
Location: Cyberspace
Posted: 5th Mar 2005 03:22
unfortunately edit boxes are for text and therefore only will return a string - you could do a test like

if first char of string is 1 then myint =1 and so on

Used to be Phoenix_insane registered in september 2003 despite what the date says to the left <--
PC - amd athlon 2.0ghz, 512mb, GeForce FX 5200 128mb, 200gb, xp pro sp2
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 5th Mar 2005 03:56
Use VAL(MyString$) to get the value.

You can use an up/down control with an input-disabled text box if you want to prevent alpha input.

BatVink
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 5th Mar 2005 04:12
Edit boxes return strings since that is what they are for - to store text which can be edited by the user.

Note that Val will return 0 if the box contains anything other than a number.

Putting it together.

editValue=val(getGadgetText(editGadgetHandle))


BlueGUI Windows Plugin
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 5th Mar 2005 18:05
Hey, Rob K, I was born in Surrey


"Lets migrate like bricks" - Me
The thing
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location: Somewhere in the U.K
Posted: 18th Mar 2005 23:08
Thanks for the help. never thought of using val.

C.M.M

Login to post a reply

Server time is: 2024-11-23 10:21:23
Your offset time is: 2024-11-23 10:21:23