cannot create a long tree
- From: "SirVlad" <sirvlad inbox ru>
- To: gtk-list gnome org
- Subject: cannot create a long tree
- Date: Wed, 14 May 2003 12:22:15 +0400
Hello!
I am writing an application in GTK and I need long trees, 20000 nodes and maybe more. Is it a problem? When I come to about a thousand or so the long subtree does not appear in the scrolled window, only its parent. This is my code:
static GtkWidget *drawTree(unsigned int treelen)
{
GtkWidget *tree;
GtkWidget *subTree;
GtkWidget *treeItem;
int i;
tree = gtk_tree_new();
treeItem = gtk_tree_item_new_with_label("One");
gtk_tree_append(GTK_TREE(tree), treeItem);
subTree=gtk_tree_new();
gtk_tree_item_set_subtree(GTK_TREE_ITEM(treeItem), subTree);
g_print("drawTree: treelen = %d\n", treelen);
for (i=0; i<treelen; i++)
{
treeItem=gtk_tree_item_new_with_label("Itemname");
gtk_tree_append(GTK_TREE(subTree), treeItem);
gtk_widget_show(treeItem);
}
gtk_widget_show_all(subTree);
gtk_widget_show_all(tree);
return(tree);
}
And I get only + "One" and that's all... If treelen is about 500 everything is ok. Maybe the problem is with the container which holds tree?
Thank you very much for any answer,
Cheers,
--
roy.
There is nothing so fatiguing as the eternal hanging on of an uncompleted task. (C)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]