Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SPINNER MouseWheel oddity?
Message
From
07/05/2003 10:24:37
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
SPINNER MouseWheel oddity?
Miscellaneous
Thread ID:
00785804
Message ID:
00785804
Views:
74
This is only in the VFP8 category because I am using VFP8...

I have a container that has a few SPINNER controls on it. This is my first experience with spinners as I don't particularly like the interface, but it offers the best option in this application.

In any case, while developing the control I noticed something interseting and helpful...
I had code in both the DownClick and UpClick events and I accidentally discovered during early testing that if I had the control SELECTED (with focus) and used the wheel then the code from DownClick or UpClick, as applicable by the wheel action, executed!!! This was evident because I have a "slider bar" in the control that is moved in unison with the changing values.
I saw this as a nice bonus that would be helpful to the user.

But this gave me the idea to have the wheel operate when the mouse was over the control but it did NOT have the focus. I tried this as it was and there was NO CHANGE in the value.
So I added code to the MouseWheel event to make it operate when it did NOT have focus. This worked nicely in that the "slider bar" and the spinner value changed according to the wheeled action.

HOWEVER, now when the control is wheeled when it has focus the slider moves by 2 units and the number is adjusted by 2 units#@$!#@$!

This is UNhelpful in the extreme and doesn't make a lot of sense overall. Something seems amiss and I'd like to know:
1) what is amiss
2) how to fix it.

I've tried putting a
IF This.GotFocus()
    RETURN
ENDIF
but that makes for NO CHANGE in the value or the slider, implying (I think) that the control actually HAS FOCUS when the mouse is over it.

Thanks
Next
Reply
Map
View

Click here to load this message in the networking platform