Re: change treeview's cell height
- From: Rudra Banerjee <rudra banerjee aol co uk>
- To: gtk-app-devel-list gnome org
- Subject: Re: change treeview's cell height
- Date: Thu, 24 Jan 2013 23:33:49 +0000
Thanks for your reply.
Can you kindly give a short example?
I have defined my tree as:
store = gtk_list_store_new (NUM_COLS, G_TYPE_STRING, G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_STRING);
tree = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store));
gtk_tree_view_set_rules_hint (GTK_TREE_VIEW(tree), TRUE);
and the cell as:
cell = gtk_cell_renderer_text_new ();
col_auth=gtk_tree_view_column_new_with_attributes (
"Author", cell,
"text", COL_BIB_NAME,
NULL);
gtk_tree_view_column_set_sort_column_id( col_auth, ID_NAME);
gtk_tree_view_append_column (GTK_TREE_VIEW (tree), col_auth);
gtk_tree_view_column_set_max_width (col_auth,350);
I googled the wrap_mode, but I haven't have any example. Please give me
a short example(even one liner)
On Thu, 2013-01-24 at 15:17 -0800, Andrew Potter wrote:
On Thu, Jan 24, 2013 at 1:53 PM, Rudra Banerjee <rudra banerjee aol co uk>wrote:
In my treeview, I have cells of fixed width, and I want texts longer
than that should be wrapped with height increased.
Get a pointer to the GtkCellRendererText for the column in question;
depending on how you construct your TreeView there are different methods.
When you have that you can experiment with changing different properties,
such as wrap-mode and wrap-width.
See http://developer.gnome.org/gtk3/stable/GtkCellRendererText.html
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]