Is it possible to detect that my actual control is menu?

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
mol
Posts: 3825
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Is it possible to detect that my actual control is menu?

Post by mol »

Hi guys!
I often use SET ESCAPE TO release window.
But, when user enters in upper menu of window, pressing ESCAPE causes coling window, now leaving upper menu.
Is it possible to detect if focus is on menu?

Regards, Marek
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Is it possible to detect that my actual control is menu

Post by esgici »

Hi Mol
mol wrote:Hi guys!
I often use SET ESCAPE TO release window.
Sorry, but what is this SET ESCAPE TO :?: :?

Regards

--

Esgici
Viva INTERNATIONAL HMG :D
User avatar
Rathinagiri
Posts: 5482
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Is it possible to detect that my actual control is menu

Post by Rathinagiri »

I think he talks about 'on key ESCAPE action...'.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
mol
Posts: 3825
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Is it possible to detect that my actual control is menu

Post by mol »

Sorry for my inaccuracy..
Of course, I meant:

Code: Select all

ON KEY ESCAPE OF FORM_1 action DoMethod(ThisWindow.Name, "Release")
When I activate top menu and press ESCAPE, whole window is closed, not only menu.
So, I need to change action of ESCAPE key to:

Code: Select all

 if .not. ActivatedMenu
    DoMethod(ThisWindow.Name, "Release")
 endif
regards, Marek
Post Reply