开发者

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")
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜