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

Username:   Password: 
 RegisterRegister   
 ready to use menu
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
bubbles3




PostPosted: Mon Jun 06, 2005 12:01 pm   Post subject: ready to use menu

this is a menu that has been placed in my compsci final project
just replace the new, open... text with your own but leave the "---"s
code:

colour (white)
var first, second : int
var item : array 1 .. 10 of int
var name : array 1 .. 10 of string (4) :=
    init ("New", "---", "Open", "---", "Save", "---", "Prin", "---", "Exit", "---")
var name2 : array 1 .. 1 of string (4) :=   
    init ("Info")
forward proc exitwindow

first := GUI.CreateMenu ("File")
item (1) := GUI.CreateMenuItem (name (1), exitwindow)
item (2) := GUI.CreateMenuItem (name (2), exitwindow)
item (3) := GUI.CreateMenuItem (name (3), exitwindow)
item (4) := GUI.CreateMenuItem (name (4), exitwindow)
item (5) := GUI.CreateMenuItem (name (5), exitwindow)
item (6) := GUI.CreateMenuItem (name (6), exitwindow)
item (7) := GUI.CreateMenuItem (name (7), exitwindow)
item (8) := GUI.CreateMenuItem (name (8), exitwindow)
item (9) := GUI.CreateMenuItem (name (9), exitwindow)

second := GUI.CreateMenu ("Help")
item (10) := GUI.CreateMenuItem (name2 (1), exitwindow)

process my_background
    loop
        exit when GUI.ProcessEvent
    end loop
end my_background
fork my_background
body proc exitwindow
    Window.Close (win)
end exitwindow
Sponsor
Sponsor
Sponsor
sponsor
Bacchus




PostPosted: Mon Jun 06, 2005 3:18 pm   Post subject: (No subject)

And what is the point of this?
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  [ 2 Posts ]
Jump to:   


Style:  
Search: