Computer Science Canada Text fields in turing |
Author: | tum_twish [ Fri Apr 25, 2003 10:50 am ] |
Post subject: | Text fields in turing |
in turing, you have to declare a procedure that happens when someone presses enter in a text box. how can I do it such that when the user clicks outside the field the procedure is run? |
Author: | Blade [ Fri Apr 25, 2003 10:57 am ] |
Post subject: | |
instead telling the program to look for a carrage return, look for a mouse click.. using Mouse.Where(mousex,mousey,mousebutton) i dont know anything about gui, so i dont know how to incorporate it. i also dont know if you can change it, but if you can, thats what i would do.. lol |
Author: | JSBN [ Fri Apr 25, 2003 11:33 am ] | ||
Post subject: | |||
ok gui can be kinda tricky....lol just kidding ok first u need an enter button and the txt field... u got that? k from the Turing help file (F10 in turing 4.0.4) Quote: GUI.SetDefault Part of GUI module Syntax : GUI.SetDefault (widgetID : int, default : boolean) Description: Sets the "default status" of a button specified by widgetID. If a button is the default button, then it is drawn with a heavy outline and it is activated when the user presses ENTER (RETURN on a Macintosh). Only one button can be the default button per window. If a button is set to be the default button, then the previous default button has its "default status" removed. Example: See GUI.CreateTextField for an example of GUI.SetCheckBox. Status: Exported qualified. This means that you can only call the procedures by calling GUI.SetDefault, not by calling SetDefault. See also GUI.CreateButton. Here is an example:
|