On 05/11/12 06:32, Matthias Melcher wrote: > > On 11.05.2012, at 03:58, David Currie wrote: > >>> On 05/10/12 06:07, David Currie wrote: >>>> How does one control the text caret in Fl_Text_Display. >>>> I mean the TEXT cursor (caret) not the mouse cursor ? >>> >>> To control its on/off state, show_cursor(1|0), >>> To control its position, insert_position(pos). >> >> is there some example code because I can't get ANY cursor >> to show ? > > Use Fl_Text_Editor. That one has a cursor.
I'm assuming he wants a readonly scrollable display. > Or use Fl_[Multiline]_Output, > which has a minimal little cursor and is output-only. IIRC, trouble with Fl_*_Output is no scrollbars. I moved a lot of stuff away from that widget just to get the scrollbars. If there's bugs/shortcomings with Fl_Text_Display's caret + keynav, we should probably fix it, so that it can be a fully functional replacement for Fl_Multiline_Output. I did notice, as David did, that the caret would sometimes not appear. I found if the window opened when my mouse wasn't in it, the caret wouldn't appear. And moving the mouse INTO the window didn't make it appear. I had to add 'take_focus()' to make it show up when the window opened without the mouse in it. (On my linux system, the window manager uses "focus follows mouse") _______________________________________________ fltk-dev mailing list fltk-dev@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-dev