hi,
i'am new to gtk
i want to populate treeview
when the code is inside create_app1 (created by glade) everything is fine
i tried to put the code outside but i guess i cannot get the pointer
correctly
doeas g_object_get_data find recursively?
abd what is the difference with (made by glade) lookup_widget (i tried as
well but doeas not work as well, they seem to share that ;) )
/**********************/
GtkWidget* main_window;
void treee()
{
GtkWidget *treeview1;
GtkTreeViewColumn *column;
GtkCellRenderer *renderer;
treeview1 = g_object_get_data (G_OBJECT (main_window),"treeview1");
renderer = gtk_cell_renderer_text_new ();
column = gtk_tree_view_column_new_with_attributes ("id", renderer,"text", 0, NULL);
gtk_tree_view_append_column (GTK_TREE_VIEW (treeview1), column);
}
int main()
{
/* ... */
main_window = create_app1();
treee();
/* ... */
}
--
Michal Adamczak
pokryfka druid if uj edu pl
nobody knows what happens when you die
live as you want - it doesnt mean you'r right
that is on facts of life
Attachment:
pgp7E6odgHvva.pgp
Description: PGP signature