将gtk.TreeView列添加到大小组 [英] Add gtk.TreeView columns to a size group

查看:108
本文介绍了将gtk.TreeView列添加到大小组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想堆叠两个treeviews彼此,并有列对齐。我想这样做的方式是以某种方式使用 gtk.SizeGroup 。然而, gtk.TreeViewColumn 不是一个小部件...我该如何做到这一点?

I want to stack two treeviews on each other and have the columns be aligned. I figured the way to do this would be to use a gtk.SizeGroup somehow. However, gtk.TreeViewColumn is not a widget... how can I do this?

推荐答案

我有两个建议:


  1. 看看 gtk.SizeGroup 被实现,看看你是否可以编写自己的 TreeViewColumnSizeGroup

  2. 连接到 notify :: width

  1. Look at how gtk.SizeGroup is implemented and see if you can write your own TreeViewColumnSizeGroup.
  2. Connect to notify::width of each column and in the callback set the width of the corresponding column in the other treeview.

这篇关于将gtk.TreeView列添加到大小组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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