[fxruby-users] intercepting messages from FXScrollBartoFXScrollArea

Dirk Schwendemann ujb1 at gmx.de
Wed Apr 5 10:45:31 EDT 2006

Hello Jeroen, Henon and Lyle,

I've tried to overload the layout method of FXText with this:

def layout()
  verticalScrollBar.resize(verticalScrollBar.width, height)

This works as long as the user doesn't use the keyboard to enter text into
the textfield. It seems, as if user actions (e.g entering text with the
keyboard)trigger the layout method of FXText directly without calling the
overloaded ruby method.

I've added a SEL_CHANGED handler to the TextField to catch these events and
correct the Scrollbar. This approach works, if notify=true is used in all
calls to appendText and appendStyledText.

I also tried to put a "next 0" at the end of the SEL_CONFIGURE message
handler of my first trial:

  next 0

Unfortunately this doesn't work neither - probably because the original
target has been overwritten by the connect command.

Nevertheless the scroll down button is now at the place I wanted it to be.
Thank you for your time and advice


Echte DSL-Flatrate dauerhaft für 0,- Euro*!
"Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl

More information about the fxruby-users mailing list