On Jul 1, 2006, at 6:20 AM, Chuck Pelto wrote:
Regarding the use of Mouse Events in a slider, what is meant by...
"The mouse button was released inside the scrollbar at the location
passed in to x,y. This event will not occur unless you return True
in the MouseDown event."
I ask because I'm not sure what is meant by returning TRUE in the
MouseDown event.
When you put code in an event of a control you are basically doing
something before REALbasic runs its own methods. If the event is a
Boolean Function, you also have the option of selecting whether or
not you wish to avoid the normal REALbasic code that follows and
insert your own methods instead. By returning false (or NOT returning
true) then the event will continue with its normal execution after
your code.
If you wish to cancel or re-direct this automatic process, then
returning true will do just that.
I've found that the MouseExit event works in collecting information
about a slider's location, but MouseUp does not. And I'd rather use
MouseUp than MouseExit, just to be more efficient. Seems that just
moving the cursor across the slider triggers the action.
The MouseEnter and MouseExit events are triggered when the mouse
enters or leaves the control's boundaries. They do not return
anything and I wonder how you are obtaining this information.
So how does one return TRUE from the MouseDown event?
By typing "Return True" within the MouseDown event at the appropriate
place(s).
And return TRUE to WHAT?
Most times you would be using this to trigger the MouseDrag or
MouseUp events. Neither of these events will be triggered unless
"Return True" is executed in the MouseDown event.
These are the basics and, without seeing a code example, is as far as
I can go for now.
HTH,
Terry
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>