> In that case you could subclass FXSlider and override the default > messages handlers for the SEL_MOTION, SEL_LEFTBUTTONPRESS and > SEL_LEFTBUTTONRELEASE messages. using connect(), or is there another way? > > And while I am at it: why doesn't connect() support > > multiple message handlers? > This may be changed in the near future; someone has recently posted some > code to the fxruby-users mailing list which address that very problem. I have written a simple solution, which works quite well for me. It took me exactly 10 minutes - yet another example how elegant Ruby is :-) class MultiConnectSlider < FXSlider def initialize(*params) super(*params) @sigHandler = Hash.new do |h, n| h[n] = Array.new end end def connect(signal) @sigHandler[signal].push Proc.new super(signal) do |sender, selector, data| @sigHandler[signal].each do |proc| proc.call(sender, selector, data) end end end end