GtkTreeView having nodes with underlined text
- From: "Miroslav Rajcic" <rajcic sokrates hr>
- To: <gtk-app-devel-list gnome org>
- Subject: GtkTreeView having nodes with underlined text
- Date: Wed, 22 Nov 2006 13:28:32 +0100
I am having a problem to underline text for some (not all) nodes in a
GtkTreeView.
I've tried following:
1. a) add new column in the tree store of type G_TYPE_ENUM (tried integer
type too)
b) attach text renderer to this store column:
gtk_tree_view_column_set_attributes(column, renderer,
"underline", STORE_IDX_UNDERLINE,
NULL);
Unfortuantely, this does not work. I even added a store column for
"underline-set", and attached the renderer property to that store col.
No luck, this does not seem to work at all. Setting underline property in
the store, does not change the display at all (see code below).
gtk_tree_store_set (GTK_TREE_STORE(model), &iternew, STORE_IDX_UNDERLINE,
PANGO_UNDERLINE_SINGLE, -1);
2. Setting the property of the renderer manages to achieve underlined font,
but this time ALL tree nodes are underlined (which is logical).
GValue value = { 0, };
g_value_init (&value, PANGO_TYPE_UNDERLINE);
g_value_set_enum (&value, PANGO_UNDERLINE_SINGLE);
g_object_set_property (G_OBJECT (renderer), "underline", &value);
g_value_unset (&value);
My question:
Does anyone have the code to set underline font for arbitrary node in a tree
?
TIA
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]