本文整理汇总了Python中dtk.ui.treeview.TreeView.set_hide_columns方法的典型用法代码示例。如果您正苦于以下问题:Python TreeView.set_hide_columns方法的具体用法?Python TreeView.set_hide_columns怎么用?Python TreeView.set_hide_columns使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dtk.ui.treeview.TreeView
的用法示例。
在下文中一共展示了TreeView.set_hide_columns方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: TreeView
# 需要导入模块: from dtk.ui.treeview import TreeView [as 别名]
# 或者: from dtk.ui.treeview.TreeView import set_hide_columns [as 别名]
application.add_titlebar(
["theme", "max", "min", "close"],
os.path.join(get_current_dir(__file__), "logo.png"),
"TreeView demo",
"TreeView demo",
)
# Add TreeView.
print os.path.expanduser("~")
treeview = TreeView(get_dir_items(os.path.expanduser("~")))
# expand column.
treeview.set_expand_column(3)
# hide column
treeview.set_hide_columns([1, 2])
#treeview.set_highlight_item(treeview.get_items()[35])
treeview.connect("delete-select-items", m_delete_select_items)
treeview.connect("button-press-item", m_button_press_item)
treeview.connect("double-click-item", m_double_click_item)
treeview.connect("right-press-items", m_right_press_items)
treeview.connect("single-click-item", m_single_click_item)
# treeview = TreeView(get_dir_items("/"))
treeview_align = gtk.Alignment()
treeview_align.set(0.5, 0.5, 1, 1)
treeview_align.set_padding(0, 2, 2, 2)
treeview.set_column_titles(["文件名", "大小", "类型", "修改时间"],
[sort_by_name, sort_by_size, sort_by_type, sort_by_mtime])