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...
HotKey for every controls
Moderator: Rathinagiri
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HotKey for every controls
So, it is possible that I've don't fully understood you...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
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HotKey for every controls
Ok.Roberto Lopez wrote:So, it is possible that I've don't fully understood you...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
I've re-read and I've understood now...
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HotKey for every controls
mmm... I'm not sure if that is the right way...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?)
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)
Roberto
(Veritas Filia Temporis)
Re: HotKey for every controls
every man can write in English, but not everyone can be understoodRoberto Lopez wrote:Ok.Roberto Lopez wrote:So, it is possible that I've don't fully understood you...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
I've re-read and I've understood now...
(I'm writing about myself of course )
Marek
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HotKey for every controls
It's normal for me to not understand things the first time I've read, even on my native tongue (Spanish)mol wrote:
every man can write in English, but not everyone can be understood
(I'm writing about myself of course )
Marek
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)