WIP: gtk_tree_view_set_reorderable (GTK_TREE_VIEW (treeview), TRUE);

This commit is contained in:
Jean Sirmai 2023-12-16 18:19:54 +01:00
parent aa5ca0711f
commit 0ed20386a7
Signed by: jean
GPG Key ID: FB3115C340E057E3
1 changed files with 15 additions and 0 deletions

View File

@ -28,6 +28,20 @@
/*************************************************************************************************************************************/ /*************************************************************************************************************************************/
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
/******************************** S O M E L I T T L E T H I N G S T O K N O W **********************************/
/* */
/* gtk_tree_view_set_show_expanders (GTK_TREE_VIEW (treeview), TRUE); */
/* gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview), TRUE); */
/* GTK_TREE_VIEW (treeview) expanders are shown; */
/* gtk_widget_set_vexpand (treeview, TRUE); */
/* gtk_tree_view_set_reorderable (GTK_TREE_VIEW (treeview), TRUE); */
/* */
/*************************************************************************************************************************************/
/* The GtkTreeStore is used to store data in tree form, to be used later on by a GtkTreeView to display it. /* The GtkTreeStore is used to store data in tree form, to be used later on by a GtkTreeView to display it.
* This demo builds a simple GtkTreeStore and displays it. * This demo builds a simple GtkTreeStore and displays it.
* If you're new to the GtkTreeView widgets and associates, look into the GtkListStore example first. */ * If you're new to the GtkTreeView widgets and associates, look into the GtkListStore example first. */
@ -172,6 +186,7 @@ do_tree_store (GtkWidget *do_widget)
/* create tree view */ /* create tree view */
treeview = gtk_tree_view_new_with_model (model); treeview = gtk_tree_view_new_with_model (model);
gtk_widget_set_vexpand (treeview, TRUE); gtk_widget_set_vexpand (treeview, TRUE);
if (1) gtk_tree_view_set_reorderable (GTK_TREE_VIEW (treeview), TRUE);
g_object_unref (model); g_object_unref (model);
gtk_tree_selection_set_mode (gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)), gtk_tree_selection_set_mode (gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)),
GTK_SELECTION_MULTIPLE); GTK_SELECTION_MULTIPLE);