Paned

来源:互联网 发布:jsp连接数据库用户登录 编辑:程序博客网 时间:2024/05/18 03:37

学习gtkmm有几周了,英语太烂了,硬着头皮边看边记,还没把握,发上来,大家斧正

7.1.2. Paned

Panes divide a widget into two halves, separated by a moveable divider. There are two such widgets: Gtk::HPaned adds a horizontal divider, and Gtk::VPaned adds a vertical one. Other than the names and the orientations, there's no difference between the two.

Paned将控件分隔成由可移动分隔条分隔的相互独立的两个区域。 有两个相同的控件:Gtk::HPaned 添加一个水平分隔条Gtk::VPaned添加一个竖直分隔条。除了名称和分隔方向,它们没什么不同。

Unlike the other widgets in this chapter, pane widgets contain not one but two child widgets, one in each pane. Therefore, you should use add1() and add2() instead of the add() method.

不像在本章其他控件,paned包含的不是一个而是两个子控件,每个窗格一个。因此你应该用add1()add2()代替add()方法。

You can adjust the position of the divider using the set_position() method, and you will probably need to do so.

你可以使用 set_position) 方法调整分隔条的位置,你或许将会需要这么做。

参考

§  7.1.2.1. 示例

7.1.2.1. 示例

7-2 Paned

源代码

原创粉丝点击