FLTK 1.4, not too old; Linux MATE 20.1; gcc 9.3.0.
A small program derived from the tree-as-container example. Instead of using Fl_Tree_Item widgets, I'm drawing them dynamically. A Fl_Tree_Item consists of a checkbox and a label, except if the item is in "edit mode", when it is a checkbox and a Fl_Input. To enter "edit mode", the tree item must be RE-selected.
The problem: when I try to edit an existing tree item, the mouse cursor disappears over the window. After that, only keyboard navigation works in the tree, and I can't seem to RE-select an item any longer [assuming that hitting space twice on an item should RE-select it].
I've been thrashing on this for a bit, and would appreciate some ideas on what I've done wrong.
I'm attaching my stripped down program. To reproduce the issue, do the following: 1. run the program 2. Make sure the item "Outline" is selected. [shows in green] 3. Press enter. A new item is created: a Fl_Input appears, enter some text. Press enter. 4. The new item should be highlighted in green at this point. Repeat step 3 a couple of times. You should have three tree child items with text. 5. With the mouse, click on the 2d item to select it, then click again to RE-select it. 6. The Fl_input appears: start typing some text.
As soon as I start typing text at step 6, the mouse disappears. Pressing enter to finish editing doesn't restore the mouse; up and down arrow work to move the selection focus among the tree items but pressing space twice on a focused item doesn't RE-select it.
My thanks for any advice! Kevin
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/6f1b29cb-33b8-4bc6-91dd-21758c8cea0fn%40googlegroups.com.
[ Direct Link to Message ] |