gpt4 book ai didi

gtk - GtkTreeViews 上的列大小

转载 作者:行者123 更新时间:2023-12-04 07:10:09 27 4
gpt4 key购买 nike

如何设置 GtkTreeView 上特定列的水平尺寸?我的 TreeView 上有 4 列,最后一列扩展了剩余的可用空间。如何设置第一列或第二列在可用空间上扩展以在所有列上设置固定宽度?

最佳答案

您可以使用 gtk_tree_view_get_column 获取 TreeView 的第 n 列,然后使用带有 GTK_TREE_VIEW_COLUMN_FIXEDgtk_tree_view_column_set_sizing

您还可以通过 gtk_tree_view_column_set_expand 告诉列扩展。引用docs :

Sets the column to take available extra space. This space is shared equally amongst all columns that have the expand set to TRUE. If no column has this option set, then the last column gets all extra space. By default, every column is created with this FALSE.

关于gtk - GtkTreeViews 上的列大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/502934/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com