Computer Science Canada
Problem with Text fields
|Author:||yasser_986 [ Sun Mar 28, 2004 7:43 pm ]|
|Post subject:||Problem with Text fields|
Hi....i have a problem...
im making a program using GUI...i created a text field...and i want to use what i typed in it in my program using if statments for example like if the number entered = 1 a statement will appear on the screen and says this is the first number and so...
i used the GUI.GetText But it didn't work wit me.. here is the code that i have till now:
var agetextfield : int
var age : int
if agetextfield = 12 then
put "You have to pay 3 $"
procedure getage (dummy: string )
agetextfield:= GUI.CreateTextFieldFull (15, 20, 50, "",getage, GUI.INDENT, 0, 0)
var d1:int := GUI.CreateLabelFull (15, 20+ GUI.GetHeight(agetextfield), "Age", 50, 0,GUI.CENTER, 0)
exit when GUI.ProcessEvent
|Author:||sport [ Sun Mar 28, 2004 9:16 pm ]|
Here is a sample of what you should have.
You have to exit GUI to have the entered data from the field