ImageMenuItem and textview
I have menu on my form and gtktextview: I create imageitemmenu:
self.file_new = gtk.ImageMenuItem(gtk.STOCK_NEW, agr)
key,mod = gtk.accelerator_parse("N")
self.file_new.add_accelerator("activat开发者_如何学运维e", agr, key, mod,gtk.ACCEL_VISIBLE)
But when i press n in textview at this time triggered file_new menu activate... How can i resolve it? And how can i make hot keys for example CTRL + W + S?
Thank you.
I resolved it!
key,mod = gtk.accelerator_parse("<Control>n")
精彩评论