How to setup pango markup attribute for tree view column?
Posted: Wed Oct 29, 2014 9:58 am
Hi,
after spending some hours without any solution, i have to ask here
I am trying to setup the pango markup attribute for a tree view column. Unfortunately, i cannot get it to work. What i have so far:
I think, it is just a little problem or misunderstanding, but i am stuck to that. Maybe someone has done something similar and can help.
Best regards
Uwe
after spending some hours without any solution, i have to ask here
I am trying to setup the pango markup attribute for a tree view column. Unfortunately, i cannot get it to work. What i have so far:
Code: Select all
If OpenWindow(0, 0, 0, 400, 400, "Test", #PB_Window_SystemMenu | #PB_Window_SizeGadget)
ListIconGadget(0, 0, 0, 400, 400, "Text", 300)
;add two sample rows, one with pango markup
AddGadgetItem(0, -1, "One")
AddGadgetItem(0, -1, "<b>Bold</b>")
*tree = GadgetID(0)
*column = gtk_tree_view_get_column_(*tree, 0)
*renderers = gtk_tree_view_column_get_cell_renderers_(*column)
;first column has a pixbuf and a text renderer, so we have to use index 1
*renderer.GtkCellRendererText = g_list_nth_data_(*renderers, 1)
;setting the markup property does not work
gtk_tree_view_column_add_attribute_(*column, *renderer, "markup", 1)
;even re-creating the normal text attribute does not work
;gtk_tree_view_column_clear_attributes_(*column, *renderer)
;gtk_tree_view_column_add_attribute_(*column, *renderer, "text", 1)
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIfBest regards
Uwe