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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lost Focus Event

Status
Not open for further replies.

alisaif

ISP
Apr 6, 2013
418
AE
Hi

I have performed some tasks in lost focus event in almost all textbox in a form. Now, in the same textbox I am using right click event where I define the shortcut menu and if I select any bar of this shortcut menu, it is performing task in lost focus event along with the option of bar 1.
I want to run a form by select bar 1 of menu (do form '\forms\findcust') first and then it should perform the task in lost focus event of the textbox.

Please guide. Thanks

Saif
 
You can't change the order of events. So redesign your code, the menu is outside of the textbox, so when you click outside, first lostfocus runs, then the menu item you click on, that's the way it is. Write code, which takes this into account.

So the central question is: Why do you need another order of events? What do you do in lostfocus and could you simply move it to the findcust form or the call of it? Eg you can add parameters to the DO form call when defining the context menu, eg you set lcValue = THIS.VALUE and define code to run on selection as ON SELECTION BAR 1 OF context DO FORM '\forms\findcust' WITH '&lcValue.'

Bye, Olaf.
 
Thanks for the reply, can u give me an example how to do this?

Saif
 
I don't know what you do in right click exactly and why you need the focus to stay in the textbox, so how should I give you more than a hint?

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top