I am trying to make some changes in the tree.cxx example in the Fltk test
folder.
Right now, when an item is added to the tree, the verbose output is displayed
on the command prompt. For example -
-ROOT (2 children, this= 0x55b240, parent=(nil) depth=0)
|-Ascending (6 children, this=...)
How do I disable this verbose output in the terminal when I add an item to the
tree?
I tried the following but it did not work -
Fl_Tree_Item *i;
i = tree->add("Ascending/Zzz");
Also, I'll like to display an image if the corresponding tree item is
selected.How do I setup a handle for tree item selection events through mouse
clicks and keyboard up/down keys?
Right now, the tree call back function is not getting any callbacks. I tried
the following but it didn't work -
static void cb_tree(Fl_Tree*, void*) {
Fl_Tree_Item *item = tree->item_clicked();
item->select( item->is_selected() ? 0 : 1);
tree->redraw();
char junk [150];
sprintf(junk, "TREE CALLBACK: label='%s' userdata=%ld\n",
item->label(),
(long)tree->user_data());
Fl_Button button(30,50,200,30,junk);
button.redraw();
}
Thanks in advance for your help!
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk