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

Username:   Password: 
 RegisterRegister   
 checkboxes question
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Fiend-Master




PostPosted: Sat Jan 29, 2005 3:39 pm   Post subject: checkboxes question

with checkboxes, is it possible to create a checkbox, and make it so that it is already checked? or, is it possible to to refresh a certain checkbox so that i can set it to "checked" depending on settings? I am asking because i am making a program, and based on user-saved settings, I need some checkboxes to be checked, while others to be blank when the checkboxes appear on the screen. any help would be appreciated, thanks in advance
Sponsor
Sponsor
Sponsor
sponsor
person




PostPosted: Sat Jan 29, 2005 4:05 pm   Post subject: (No subject)

its in turing help (the F10 one not the compsci one)
person




PostPosted: Sat Jan 29, 2005 4:08 pm   Post subject: (No subject)

btw if u cant find it here it is

Quote:

% The "GUI.CreateCheckBoxFull" program.
import GUI

procedure DoNothing (status : boolean)
end DoNothing

View.Set ("graphics:300;100,nobuttonbar")
var cb1 : int := GUI.CreateCheckBox (10, 10, "Check Box 1",
DoNothing)
var cb2 : int := GUI.CreateCheckBoxFull (200, 10, "Check Box 2",
DoNothing, GUI.RIGHT, '2')
GUI.SetCheckBox (cb2, true)
var quitBtn : int := GUI.CreateButton (230, 10, 0, "Quit", GUI.Quit)
loop
exit when GUI.ProcessEvent
end loop
var cb1Status : boolean := GUI.GetCheckBox (cb1)
var cb2Status : boolean := GUI.GetCheckBox (cb2)
if cb1Status then
put "Check box 1: filled"
else
put "Check box 1: empty"
end if
if cb2Status then
put "Check box 2: filled"
else
put "Check box 2: empty"
end if


remember to use "createbuttonfull"

EDIT: createbuttonfull = createcheckboxfull
Delos




PostPosted: Sat Jan 29, 2005 6:22 pm   Post subject: (No subject)

Methinks you mean "CreateCheckboxFull" (or however it's spelt). Also, I have a nagging suspiscion that "GUI.SetCheckBox (cb2, true)" will set the status of the checkbox.
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  [ 4 Posts ]
Jump to:   


Style:  
Search: