FLTK logo

Re: [fltk/fltk] Setting callback of Fl_Scroll's scrollbar freezes the scrollbar (#198)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.issues  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: [fltk/fltk] Setting callback of Fl_Scroll's scrollbar freezes the scrollbar (#198) erco77 Mar 04, 2021  
 

Pretty sure by just setting the callback without saving the original callback, you've disabled Fl_Scroll's
default behavior. If you want to keep Fl_Scroll's behavior intact, you have to save the default Fl_Scroll::callback()
before changing it, then invoke that callback from your own, where you deem it appropriate in your code to do so.

This is useful so that your callback code can control what happens in the scrollback before letting Fl_Scroll do
what it needs to do. But like with handle() methods, you have to be sure to invoke the original widget's callback
from your own code, otherwise your code will eclipse the default behavior.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.