inserting a column in a treeview....
- From: Ottavio Campana <ottavio campana vi it>
- To: gtk-list gnome org
- Subject: inserting a column in a treeview....
- Date: Thu, 26 Dec 2002 23:32:18 +0100
Hi!
I'm developing an application with gtk 2.0 and I'm having some problems
with the treeview. I've created a widget and I want to add a treeview to
it. The treeview seems to be there, I see it white under the toolbar.
The only problem is that I cannot insert any row. In the tutorial the
explanation is missing. Can you please help me?
Here's the code:
fdisk->treeview = (GtkTreeView*) gtk_tree_view_new ();
gtk_container_add (GTK_CONTAINER(fdisk), (GtkWidget*) fdisk->treeview);
gtk_widget_show ((GtkWidget*) fdisk->treeview);
renderer = (GtkCellRenderer*) gtk_cell_renderer_text_new ();
column = gtk_tree_view_column_new_with_attributes ("Partizione",
renderer,
"text", 0,
"foreground", 1,
NULL);
gtk_tree_view_insert_column ((GtkTreeView*) fdisk->treeview, (GtkTreeViewColumn*) column, -1);
gtk_widget_show((GtkWidget*) column);
It compiles, seems to work, but I don't see the column... Why?
Thank you.
--
Non c'è più forza nella normalità, c'è solo monotonia.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]