Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List of default processings/actions of Methods & Events

Status
Not open for further replies.

Rajesh Karunakaran

Programmer
Sep 29, 2016
535
0
16
MU
Hi Team!

We have NODEFAULT command.
Do we have some way to know the default processing of any given Method or Event ?

For example, if I want to know the default processing of GotFocus event, where do I find the information?

Thanks,
Rajesh
 
The default method of any event is the action that the event responds to. For example, the default action of the GofFocus event is for the relevant control to receive focus. The default action of the Keypress event is for the key to be processed in some way, such as inserting a character into a control.

You ask where you can find that information. You can find it in the description of the relevant event. For example, for GotFocus:

VFP Help said:
Occurs when an object receives the focus, either by user action or through code.

It's possible that you have misunderstood how NODEFAULT is used. If you can explain what you are trying to achieve, it might be easier for us to help you.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Hi Mike,

What I know about NODEFAULT is that we can use it to bypass the default action performed by events.
If we use NODEFAULT in KeyPress, the pressed key won't be stuffed into buffer, right?

What I was trying to do is to prevent the LostFocus event triggering the Valid event once again while loosing the focus. I have already posted a thread on this some minutes back and you also have replied to it :) Let me play with these things before raising more questions in the forum.

By the way, I was wondering what happens if you put NODEFAULT in GotFocus? What would be the affect?

Rajesh
 
Rajesh,

By all means have a play with this before going any further. But let me just answer your specific questions:

If we use NODEFAULT in KeyPress, the pressed key won't be stuffed into buffer, right?

Exactly.

I was wondering what happens if you put NODEFAULT in GotFocus?

The effect would be that the control will not lose focus. The user will be stuck for ever in the control (well, not quite for ever; they would still be able to close the form or select a control from the toolbar or a menu).

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top