[fxruby-users] Questions on cursors

Ronald Pijnacker pijnacker at dse.nl
Thu Jul 13 08:55:08 EDT 2006

Hi all,

Recently I started using FXRuby (on windows) for a prototype 
visualization package.
'Til everything went nice and smooth. Thanks for a nice toolkit.

One of the things I am trying to do is to map different mousebutton
combinations to different interactions. To give feedback, I would like
to update the cursor to indicate the interaction triggered.

My approach was to enable the wait cursor when the mouse button was
pressed, and switch wait cursors for different combinations of mouse
buttons. To see which combination of mouse buttons is pressed, I use the
event.state property.

Could you please answer some questions:

1. When I press left & middle inside the canvas, move the mouse outside
   the fx-window and release both buttons, I get only one callback for
   the RELEASE, eventhough I keep the canvas grabbed. Is this expected?

2. Is the beginWaitCursor / endWaitCursor / setWaitCursor the right
   strategy? I've been playing around with setting the cursors, but I
   get quite some crashes.

3. I've created a different default cursor, which I assign to the
   DEF_ARROW_CURSOR. When I assign it to DEF_RARROW_CURSOR too, I get a
   crash during exiting. Am I doing something wrong?

4. It seems defaultCursor= is an alias to setDefaultCursor. However,
   this takes two parameters, which is kindof unexpected for a
   set-property. Did I misunderstand the meaning of defaultCursor= ?
Thanks for taking the time to answer my questions.



More information about the fxruby-users mailing list