Can anyone point me to a faq or give me a quick hint on adding shift+click function to my textbox class. I am already using rightclick, click, and doubleclick events.
Steve,
You can't add "Events" in FoxPro. You can add Methods, and Properties.
Now, that said, I imagine that in theory (I haven't tried this myself), you might be able to use the Click event with some clever code, to mimic a seperate "SHIFT+Click" event, if you check for the presence of a Shift key press at the time the click event occurs. (Using the INKEY()) value. You could then do something like:
IF INKEY(<Shift, Ctrl, Whatever>)
Do something
ELSE
Do something else...
ENDIF
Or, put it in a CASE, if you have more than one. The only thing I'm not certain of is the dectection of the SHIFT key in the INKEY() function. (I'm not at a machine that I have VFP installed on, so I can't look up the function). But, it's a thought. Maybe that will lead you to some other solution if it does not work.
Best Regards,
Scott
"Everything should be made as simple as possible, and no simpler."
Thanks for your help. I could not get inkey() to do what I wanted but I am having much more success with the mousedown event. It will distinguish the state of the click.
Looking for "gotchas" now. If anyone knows of any please let me know.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.