Initial Focus

Creative ideas/suggestions for HMG

Moderator: Rathinagiri

Post Reply
User avatar
Czarny_Pijar
Posts: 172
Joined: Thu Mar 18, 2010 11:31 pm
Location: 19.2341 E 50.2267 N

Initial Focus

Post 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.
Attachments
first_focus.zip
(1.77 KiB) Downloaded 291 times
User avatar
gfilatov
Posts: 1068
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: Initial Focus

Post 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 :idea:
Last edited by gfilatov on Thu Apr 22, 2010 11:41 am, edited 1 time in total.
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Initial Focus

Post 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!
Regards/Saludos,

Roberto


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

Re: Initial Focus

Post 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
Post Reply