Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Text fields in turing
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
tum_twish




PostPosted: 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?
Sponsor
Sponsor
Sponsor
sponsor
Blade




PostPosted: Fri Apr 25, 2003 10:57 am   Post subject: (No 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
JSBN




PostPosted: Fri Apr 25, 2003 11:33 am   Post subject: (No 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:
code:
GUI.SetDefault (widgetID, true)
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: