Activating controls by ALT+... hotkey

Moderator: Rathinagiri

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

Re: Activating controls by ALT+... hotkey

Post by mol »

Thanks for your attention!
I've spent some time to test these hotkeys on 5 different computers and it works different on each of them...
I was looking in sources and I know, th load window command is translated to define window, but, it causes different work. I'll test it again.
Best regards, Marek
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Activating controls by ALT+... hotkey

Post by mol »

I've returned to testing hotkeys and I want to write my comments:
1.The order of control definitions is significant!
When you define label hotkey using & character, eg.

Code: Select all

label.value := "Press ALT-&Q for activating field 1..."
pressing alt-Q causes setting focus on first control defined after label (textbox, grid etc.)
When you change label value and redefine hotkey eq. &W, new hotkey is significant.
I think, this behavior is cool and natural
2. "ACTION" event defined in label is fired only when you click with mouse on the label
3. There is no "ACTION" event descibed in HMG documentation. There is "OnClick" event. I think, "Action" is the same as "OnClick", but, when I was reading sources of HMG (i_label.ch), I didn't found any translation of "OnClick" value.
4. I think, "OnClick" is better name, because it suggests use of mouse, not keyboard.

It looks like I've discovered America second time :lol:, but I hope my comment can be useful, especially for beginners.

Best regards, Marek
User avatar
gfilatov
Posts: 1057
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: Activating controls by ALT+... hotkey

Post by gfilatov »

Roberto Lopez wrote:
mol wrote:I've tested Danny's idea on Windows XP and worked OK.
But, now, I'm trying it on Windows 7 and it works only when I click with mouse on label, but does not work with keyboard hotkey.
Maybe Roberto will know what's going on?
Why labels are not activated by hotkey in Win'7?
There is no special code in HMG to support this. This is not documented or officially supported.

In fact I've never tested or tried this.

This is handled by the operating system automatically.

Usually there is some little incompatibilities between Windows versions, some of that are documented in MSDN and (hopefully) a workaround is published.

Grigory: Have you any additional info about that?
Roberto,

I have not an additional comments :!:

Your explanation is exhaustive 8-)
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein
Post Reply