From: Daniel Sheppard Date: 2004-04-13T11:21:09+09:00 Subject: Re: FXRuby: overload FXSlider You may also be able to overwrite the onUpdateCmd method - that's probably the easiest approach. > -----Original Message----- > From: Daniel Sheppard > Sent: Tuesday, 13 April 2004 12:19 PM > To: ruby-talk ML > Subject: Re: FXRuby: overload FXSlider > > > In regards to connect() and multiple handlers, have a look at > some recent email on the fxruby list. > > http://sourceforge.net/mailarchive/forum.php?thread_id=4142286 > &forum_id= > 33510 > http://sourceforge.net/mailarchive/forum.php?thread_id=4197535 &forum_id= 33510 What you'll probably want to do is connect to SEL_UPDATE and modify the background color there. If you want to make sure that SEL_UPDATE is left available for use elsewhere, overwrite the connect method so that it combines your colour changing with whatever is passed for SEL_UPDATE. def connect(messageType, callableObject=nil, &block) if messageType == SEL_UPDATE callableObject = block if not callableObject super(messageType) { |a,b,c| callableObject.call (a,b,c) changeBackgroundColor() } else super(messageType, callableObject, block) end end (above code may be bugridden) > -----Original Message----- > From: Martin [mailto:martinankerl@web.de] > Sent: Tuesday, 13 April 2004 7:19 AM > To: ruby-talk ML > Subject: FXRuby: overload FXSlider > > > Hi all, > > I want to create a custom control which changes the > background color of the slider whenever an update happens. > What's the best way to do this? The control should behave > exactly like FXSilder, so I can not use connect(). And while > I am at it: why doesn't connect() support multiple message handlers? > > regards, > Martin > > ######################################################################## ############# This email has been scanned by MailMarshal, an email content filter. ######################################################################## ############# ##################################################################################### This email has been scanned by MailMarshal, an email content filter. #####################################################################################