将 GtkMenuBar 与其他小部件并置?
是否可以将 GtkMenuBar 与其他小部件放在一起,而不是显示在该窗口的顶部?
或者我可以使用按钮,但是当您将鼠标悬停在这些按钮上时,按钮上的菜单不会仅仅表现得像一个菜单
,也就是说,当您靠近一个菜单时item
,菜单直接弹出,无需点击,其他menu
自动隐藏。我可以制作这样的按钮吗?或者其他可能具有:标签、图像和弹出菜单项的小部件也很酷。
任何想法表示赞赏。
Is it possible to place a GtkMenuBar with other widgets together , instead of showing at the top of that window ?
Or i could use buttons , but when you hover your mouse over those buttons , the menu on the buttons won't just behave like a menu
, which is , when you are close to one menu item
, the menu pops down directly , without click , and other menu
hide automatically. Can i make buttons like that ? Or other widgets that could have: label , image , and pop down menu item
is cool.
Any ideas is appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许连接到按钮的“enter-notify-event”和“leave-notify-event”可以帮助您完成该操作,例如分别显示和隐藏弹出菜单。
编辑
我终于忘记了那些行为有点复杂的“进入”和“离开”事件,而只使用了“motion-notify-event”......
现在我希望这是你想要的!
Maybe the "enter-notify-event" and "leave-notify-event", connected to buttons, may help you do the thing, with for example, a popup menu show and hide respectively.
EDIT
I finally forgot those "enter" and "leave" events whose behaviour was a little complex, and just used the "motion-notify-event"...
Now I hope it is what you want !