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

Username:   Password: 
 RegisterRegister   
 radio buttons
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
kit-kat-kid




PostPosted: Wed May 05, 2004 10:42 am   Post subject: radio buttons

code:
import GUI in "%oot/lib/GUI"
View.Set ("graphics:500;500")

var x, y, x1, y1, size, angle, clr : int := 0
put "Please enter the x,y,x1,y1,size,clr"
get x, y, x1, y1, size, clr
cls
proc Square
    Draw.FillBox (0, 0, maxx, maxy, white)
    Draw.Box (x, y, x1, y1, clr)
    GUI.Refresh
end Square
proc Circle
    Draw.FillBox (0, 0, maxx, maxy, white)
    Draw.Oval (x, y, x1, y1, clr)
    GUI.Refresh
end Circle
proc Star
    Draw.FillBox (0, 0, maxx, maxy, white)
    Draw.Star (x, y, x1, y1, clr)
    GUI.Refresh
end Star
proc Ball
    Draw.FillBox (0, 0, maxx, maxy, white)
    Draw.FillOval (x, y, x1, y1, clr)
    GUI.Refresh
end Ball
proc MapleLeaf
    Draw.FillBox (0, 0, maxx, maxy, white)
    Draw.MapleLeaf (x, y, x1, y1, clr)
    GUI.Refresh
end MapleLeaf
proc Block
    Draw.FillBox (0, 0, maxx, maxy, white)
    Draw.FillBox (x, y, x1, y1, clr)
    GUI.Refresh
end Block
var radioButton : array 1 .. 6 of int
radioButton (1) := GUI.CreateRadioButton (33, maxy - 50, "Square", 0, Square)
radioButton (2) := GUI.CreateRadioButton ( - 1, - 1, "Circle",
    radioButton (1), Circle)
radioButton (3) := GUI.CreateRadioButton ( - 1, - 1, "Star",
    radioButton (2), Star)
radioButton (4) := GUI.CreateRadioButton ( - 1, - 1, "Ball",
    radioButton (3), Ball)
radioButton (5) := GUI.CreateRadioButton ( - 1, - 1, "MapleLeaf",
    radioButton (4), MapleLeaf)
radioButton (6) := GUI.CreateRadioButton ( - 1, - 1, "Block",
    radioButton (5), Block)
loop
    exit when GUI.ProcessEvent
end loop
Sponsor
Sponsor
Sponsor
sponsor
Paul




PostPosted: Wed May 05, 2004 7:51 pm   Post subject: (No subject)

Hey, this isn't bad, could be useful. + 5 bits
kit-kat-kid




PostPosted: Wed May 05, 2004 8:07 pm   Post subject: (No subject)

thanks glad you like it Very Happy
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: