Computer Science Canada

Gui Question

Author:  JR [ Thu Apr 07, 2005 8:59 pm ]
Post subject:  Gui Question

hey i want to know 2 thigns

1. How do i make 2 text fields which one is the input field and one is the output field

2. how to make buttons? lets say i press the button and it does the following procedure???

Author:  lordofall [ Thu Apr 07, 2005 10:10 pm ]
Post subject: 

code:

var txtIn,txtOut,butExec:int

procedure setIn(x:string)
   ...code...
end setIn

procedure setOut (x:string)
    ...code...
end setOut

procedure execute
    var x:string := GUI.GetText(txtIn)
    ...code...
end execute

txtIn:= GUI.CreateTextField(x,y,width,"text",setIn())
txtOut := GUI.CreateTextField(x,y,width,"text",setOut)
GUI.Disable(txtOut) %you can remove this it just makes them unable to change the output u can use a textbox instead also.

butExec := GUI.CreateButton (x,y,width,"text",execute)

loop
    GUI.ProcessEvent
end loop



okay your gonna needa make your own procedures and don't forget to import GUI.
(import GUI in "%oot/lib/GUI" put that line at the top)
and you havta put where u want th buttons to appear and basically values for the variables.

Author:  JR [ Fri Apr 08, 2005 7:14 am ]
Post subject: 

what am i suppose to put into the setIn and setOut procs?

Author:  JR [ Mon Apr 11, 2005 4:23 pm ]
Post subject: 

/bump


: