From 6bd5d10730e39bd1c6e33401dd63ee482da27171 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 27 Apr 2014 14:42:45 -0400 Subject: [PATCH] Made Listbox's column autoresizing on GTK+. --- listbox_unix.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/listbox_unix.go b/listbox_unix.go index efd5641..3a4c5cc 100644 --- a/listbox_unix.go +++ b/listbox_unix.go @@ -74,7 +74,8 @@ func gListboxNew(multisel bool) *C.GtkWidget { widget := C.gtk_tree_view_new_with_model((*C.GtkTreeModel)(unsafe.Pointer(store))) tv := (*C.GtkTreeView)(unsafe.Pointer(widget)) column := C.gtkTreeViewColumnNewWithAttributes(C.gtk_cell_renderer_text_new()) - // TODO set AUTOSIZE? + C.gtk_tree_view_column_set_sizing(column, C.GTK_TREE_VIEW_COLUMN_AUTOSIZE) + C.gtk_tree_view_column_set_resizable(column, C.FALSE) // not resizeable by the user; just autoresize C.gtk_tree_view_append_column(tv, column) C.gtk_tree_view_set_headers_visible(tv, C.FALSE) sel := C.GTK_SELECTION_SINGLE