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: import GUI View.Set("graphics:500;500") var agetextfield : int procedure getage1 var age : int if agetextfield = 12 then put "You have to pay 3 $" end if end getage1 procedure getage (dummy: string ) getage1 end getage 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) loop exit when GUI.ProcessEvent end loop And thankz.. |
Author: | sport [ Sun Mar 28, 2004 9:16 pm ] | ||
Post subject: | GUI | ||
Here is a sample of what you should have. You have to exit GUI to have the entered data from the field
|