窗口小部件列出了GTK文件 [英] Widgets to list files with gtk

查看:159
本文介绍了窗口小部件列出了GTK文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建这是要列出一堆文件的应用程序。我想列出文件,如fileroller,但我不知道怎么办。我想我需要创建一个2×N个(名称,大小)的网格,但我不知道如何使项出现光>暗>每行灯,以及如何创建它上面的胖吧。谁能告诉我,我需要结合起来,创造类似的东西,什么样的小部件呢?

I am creating an application which is going to list a bunch of files. I would like to list files like fileroller, but I don't know how. I guess I need to create a 2xn (name, size) grid, but I don't know how to make entries appear light->dark->light per line, and how to create a "fat" bar above it. Can anyone tell me what sort of widgets I need to combine to create something like that?

推荐答案

您可能需要一个 GtkTreeView 用GtkListStore,应该给你你需要的一切。如果你从来没有用过它,你应该阅读树和列表控件概述并ppared做一些谷歌上搜索之后甚至$ p $ - 这是该工具包中最复杂的部件

You probably want a GtkTreeView with a GtkListStore, that should give you everything you need. If you've never used it, you should start with reading the Tree and List Widget Overview and be prepared to do some googling even afterwards -- it's the most complex widget in the toolkit.

树形视图可以有一个标题,交替光/暗行通常与 gtk_tree_view_set_rules_hint(树状,TRUE)实现 - 但请阅读文档,规则提示是一个语义的事情没有明确的可视化设置。

The treeview can have a header, and the alternating light/dark rows are typically achieved with gtk_tree_view_set_rules_hint (treeview, TRUE) -- but please read the documentation, 'rules hint' is a semantic thing not specifically a visual setting.

这篇关于窗口小部件列出了GTK文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆