View Single Post
Old 04-23-2021, 12:29 AM   #25
Amias
Member
Amias began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Apr 2021
Device: KPW4
Plus, this does not display the menu when clicked
should i bring it to top? But there is no methods.
Spoiler:

mb = gtk.MenuBar()

menu1 = gtk.Menu()
msg = gtk.MenuItem("MessageDialog")
menu1.append(msg)

def on_msgdlg(widget):
#MessageDialog usage code
print 'i was clicked'
return 0

msg.connect("activate", on_msgdlg)
vbox = gtk.VBox(False, 2)
vbox.pack_start(mb, False, False, 0)
self.mainWindow.add(vbox)

self.mainWindow.show_all()
Amias is offline   Reply With Quote