Chinaunix首页 | 论坛 | 博客
  • 博客访问: 346516
  • 博文数量: 105
  • 博客积分: 2730
  • 博客等级: 少校
  • 技术积分: 1110
  • 用 户 组: 普通用户
  • 注册时间: 2007-04-20 12:09
文章分类

全部博文(105)

文章存档

2013年(3)

2012年(2)

2011年(36)

2010年(34)

2009年(6)

2008年(20)

2007年(4)

分类: C/C++

2010-01-19 21:44:45

A frequently asked question is how you can add columns to a GtkTreeView in . The answer is basically that you don't, and that you can't. The only thing glade/libglade can do for you is to create the GtkTreeView for you with nothing in it. You will need to look up the tree view widget at the start of your application (after the interface has been created of course), and connect your list store or tree store to it. Then you will need to add GtkTreeViewColumns and cell renderers to display the information from the model as you want it to be displayed. You will need to do all that from within your application.

An alternative approach is to derive your own special widget from GtkTreeView that sets up everything as you want it to, and then use the 'custom widget' function in glade. Of course this still means that you have to write all the code to fill in the columns and cell renderers and to create the model yourself.


大意:

GtkTreeView里的列不能在glade里加入,必须手写,

glade/libglade只创建了一个GtkTreeView,里面什么也没有

自己连接store,加入列/render等等一切

另一种方法是自己自定义空间,但是这还是免不了自己写代码


阅读(973) | 评论(0) | 转发(0) |
0

上一篇:make tip

下一篇:cygwin中英文设置

给主人留下些什么吧!~~