Hi all

   I'm trying to create a menu for my application with tje following code :


==============cutting the def's ========================

mainwindow = GtkWindow(WINDOW_TOPLEVEL, title="Test")
mainwindow.set_border_width(5)
mainwindow.set_default_size(800,600)
mainwindow.connect("destroy", close_program)
 
# Main box
vbox = GtkVBox()
mainwindow.add(vbox)
vbox.show()
 
# Our menubar ...
menubar = GtkMenuBar()
vbox.pack_start(menubar, expand=FALSE)
menubar.show()
 
# ... our menues ...
filemenu = GtkMenuItem("File")
menubar.append(filemenu)
filemenu.show()  

========= cutting here ===============

    How could I insert items inside the filemenu ?

    I think I need to create a item like :

    myitem = GtkMenu()

   And to tell filemenu that myitem is it's submenu, like that :

   filemenu = GtkMenuItem("File")
   filemenu.set_submenu(myitem)
   menubar.append(filemenu)
   filemenu.show()  
                                
   But it isn't working. How could I do that ? And where I set my myitem 
content ?

   Also, wich signal I should used with a menu ? I tried "clicked" but an 
error message saying that GtkMenu() doesn't has a "clicked" signal appears.

   Well, that's all for now.

   Regards

-- 
André Luís Lopes
Utah Linuxcenter
[EMAIL PROTECTED]
http://www.utah.com.br
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to