Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accepting double click but not the focus
Message
From
13/07/2001 21:52:41
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00530544
Message ID:
00530580
Views:
13
>>>>>>I have a field which I need to accept the double click but when the user does a single click or presses a key, the focus should not appear on the field. What is the best approach to do that?
>>>>>
>>>>>In the GotFocus event: set cursor off. In DoubleClick event set cursor on in LostFocus event set cursor on. Is it enough? If not, you may try to move focus to another control, but this way, DoubleClick would not work too.
>>>>
>>>>I try to avoid those approaches as it is state related which means we have to take care of setting it to the way it was. We have to take care of such situation assuming there is an error, etc.
>>>
>>>Well, in this case I would recommend to try approach designed by Nick Neklioudov and described in his article.
>>
>>It would be ok if SET CURSOR OFF would be bound to the form only. But, that value is broadcasted in the entire environment.
>
>It's not that hard to make my original idea to preserve form's settings. E.g. form would have a new property called cSetCursor (you can make this setting to be in your application object, but IMHO, form property would better serve). Now in your class DoubleClick and LostFocus you would just put
>
>if thisform.cSetCursor='ON'
>set cursor on
>else
> set cursor off
>endif
>
>For this property in the property sheet assign =set('cursor') (note, the = is important). I usually use it for holding status bar settings. In my forms I like to set status bar on. In form's destroy I re-set it back.

Thanks
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform