Fl_Help_View copy to clipboard

63 views
Skip to first unread message

danielc...@gmail.com

unread,
Apr 24, 2022, 7:29:27 PM4/24/22
to fltk.general
Hi, the Fl_Help_View widget dont copy on ctrl+c.
Is there a way to enable this?
Thanks

Ian MacArthur

unread,
Apr 25, 2022, 4:57:19 AM4/25/22
to fltk.general
On Monday, 25 April 2022 at 00:29:27 UTC+1 danielc.. wrote:
Hi, the Fl_Help_View widget dont copy on ctrl+c.
Is there a way to enable this?


What did you try? As best I can tell, "it works for me"...

I started the Fl_Help_Dialog test (test/help_dialog.exe) and it opens with a default test script displayed. I find I can then select any section of that text and Ctrl-C will copy it to the clipboard and I can then paste the copied text into an editor.

What are you trying to do?
Perhaps it does not handle images or something (I have not tried that) - is that the issue you are having? 
Or something else?

danielc...@gmail.com

unread,
Apr 25, 2022, 10:20:48 AM4/25/22
to fltk.general

Greg Ercolano

unread,
Apr 25, 2022, 12:25:35 PM4/25/22
to fltkg...@googlegroups.com

Which OS are you running on?

Assuming you're running on Windows or Linux (and not Mac where it's Cmd-C to copy),
try running the FLTK test program test/help_dialog -- do you get the same problem
with that?

I can't replicate a problem w/copy paste from that app on linux using the latest
FLTK 1.4.x snapshot from git, e.g.

git clone https://github.com/fltk/fltk.git


Greg Ercolano

unread,
Apr 25, 2022, 12:40:08 PM4/25/22
to fltk.general
Hmm, looking at your code, seems like there code be some handle() method code that's eclipsing keyboard events from the help dialog.

Try putting several pages of text in the help dialog, and then see if you can navigate the scrollbar with the up/down and pgup/pgdn keys. If that doesn't work, check all your handle() methods to be sure they're not stealing the FL_KEYUP/FL_KEYDOWN events for themselves.. you have to be careful in handle() methods to not unintentionally short circuit away all keyboard events, as that can prevent other widgets from receiving them. Sometimes that's the right thing to do, but sometimes it's not.

Greg Ercolano

unread,
Apr 25, 2022, 12:41:57 PM4/25/22
to fltk.general
> ..seems like there code be some handle() method code..

    That should read: "seems like there might be some handle() method code.."

danielc...@gmail.com

unread,
Apr 25, 2022, 4:12:50 PM4/25/22
to fltk.general
Thanks, it was a handle returning 1 on flkeydown
Reply all
Reply to author
Forward
0 new messages