Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Default Button Status shifts to the button clicked
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01154360
Message ID:
01154390
Views:
14
This message has been marked as a message which has helped to the initial question of the thread.
Add a property to the form named oCurrentControl.

In the listboxes' Gotfocus events put this;
* Set form's current control
Thisform.oCurrentControl = This
In the form's destroy put;
* Clear the form's current control
This.oCurrentControl = NULL
In each command button's Click put;
* Your code here.

* followed by ...
Thisform.oCurrentControl.SetFocus()
This will allow the command buttons' click code to run without allowing the command buttons to ever actually get focus and will make the Enter key always fire the default button's click code.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform