HotKey for every controls

Creative ideas/suggestions for HMG

Moderator: Rathinagiri

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

Re: HotKey for every controls

Post by mol »

I've read this sample. It looks great. But, I thought about easiest definition of hotkey of control - during creating it in IDE or by defining via code.

Of course, we can do it in few other ways, eg. by ON KEY...
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HotKey for every controls

Post by Roberto Lopez »

mol wrote:I thought about OnKey event and in my opinion, this won't be the same as Hotkey.
Onkey will be fired after key pressed - but control will be focused yet.

Hotkey should be quick implementation of ON KEY of WindowName.... phrase.

Marek
So, it is possible that I've don't fully understood you...
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HotKey for every controls

Post by Roberto Lopez »

Roberto Lopez wrote:
mol wrote:I thought about OnKey event and in my opinion, this won't be the same as Hotkey.
Onkey will be fired after key pressed - but control will be focused yet.

Hotkey should be quick implementation of ON KEY of WindowName.... phrase.

Marek
So, it is possible that I've don't fully understood you...
Ok.

I've re-read and I've understood now... :)
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HotKey for every controls

Post by Roberto Lopez »

mol wrote:
Roberto Lopez wrote: It's a nice idea, but no so much easy to make :)

Going this way, I think it's very easy to make.
One extra field in IDE Object inspector (of course, it should be added to definition of every control), and while processing every control, added phrase
if !empty(HotKey)
_defineHotkey(....)
endif

It could be done without controlling syntactic correctness, with programmers responsibility.


(ps. Maybe for textboxes, datepicters for now?)
mmm... I'm not sure if that is the right way...

On Key is really a window-level event (even if it is available as an independent command)...

so... presenting it as a control property, is a design error...

Maybe, the solution here be to add a builder to visually 'construct' a complex OnKey event for windows...

I'll think on that...
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
mol
Posts: 3721
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: HotKey for every controls

Post by mol »

Roberto Lopez wrote:
Roberto Lopez wrote:
mol wrote:I thought about OnKey event and in my opinion, this won't be the same as Hotkey.
Onkey will be fired after key pressed - but control will be focused yet.

Hotkey should be quick implementation of ON KEY of WindowName.... phrase.

Marek
So, it is possible that I've don't fully understood you...
Ok.

I've re-read and I've understood now... :)
every man can write in English, but not everyone can be understood :lol:
(I'm writing about myself of course :D)
Marek
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HotKey for every controls

Post by Roberto Lopez »

mol wrote:
every man can write in English, but not everyone can be understood :lol:
(I'm writing about myself of course :D)
Marek
It's normal for me to not understand things the first time I've read, even on my native tongue (Spanish) :)
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
mol
Posts: 3721
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: HotKey for every controls

Post by mol »

I rather thought about my poor English :)
Post Reply