在Gtk绘图区域的Gtk按钮 [英] Gtk buttons over a Gtk drawing area
本文介绍了在Gtk绘图区域的Gtk按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在与Gtk一起开发一些应用程序。我必须在地图上放一些按钮。我正在GtkDrawingarea上绘制地图,但我无法将按钮放在上面。
任何建议?
Thanks $ / $>
i' working with Gtk developing some app. I must put some buttons over a map. I'm drawing the map on a GtkDrawingarea, but i'm not able to put buttons over it. Any suggestion? Thanks
推荐答案
建议:
Suggestions:
- 将绘图区域和按钮放入
GtkFixed
容器中。可能不是最好的解决方案,因为GtkFixed
没有办法控制z顺序(除了添加窗口小部件的顺序吗?) - 使用可包含其他小部件的画布小部件,而不是使用
GtkDrawingArea
,例如GooCanvas
。
- Put both the drawing area and the buttons inside a
GtkFixed
container. Probably not the best solution, becauseGtkFixed
has no way of controlling the z-ordering (other than the order in which you add the widgets to it?) - Instead of using
GtkDrawingArea
, use a canvas widget that can include other widgets, such asGooCanvas
.
这篇关于在Gtk绘图区域的Gtk按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文