Page 1 of 1
Initial Focus
Posted: Thu Apr 22, 2010 10:49 am
by Czarny_Pijar
Maybe it's a bug, maybe not... After a misunderstanding with Marek's topic I prefer put this here as a wish
At the begining of the program, the first button can't be fired using the keyboard - only mouse-click can help.
Compiled with 3.0.28 , sorry for delay, but according to the changelog this wasn't changed.
Re: Initial Focus
Posted: Thu Apr 22, 2010 11:24 am
by gfilatov
Hello,
Please try the following simple workaround:
Code: Select all
#include <hmg.ch>
Function Main
Load Window Main
Main.Button_1.SetFocus // added
Main.Center
Main.Activate
Return Nil
*-------------
procedure Action_1()
Main.Label_6.Value := "Result : Button 1 pressed"
return
*-------------
procedure Action_2()
Main.Label_6.Value := "Result : Button 2 pressed"
return
Hope that give you an idea
Re: Initial Focus
Posted: Thu Apr 22, 2010 11:26 am
by Roberto Lopez
Czarny_Pijar wrote:Maybe it's a bug, maybe not... After a misunderstanding with Marek's topic I prefer put this here as a wish
At the begining of the program, the first button can't be fired using the keyboard - only mouse-click can help.
Compiled with 3.0.28 , sorry for delay, but according to the changelog this wasn't changed.
No problem
I'll check it!
Re: Initial Focus
Posted: Thu Apr 22, 2010 12:16 pm
by mol
I think, this feature - (bug?) exists from years - when I've started my adventure with HMG in 2006 (ver 2.xx .or. 1.xx - I don't rememeber) - pressing hotkeys brings no effect while muse button is not used first.
Marek