AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Gui Enhancements

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
Tekl



Joined: 24 Sep 2004
Posts: 813
Location: Germany

PostPosted: Sat Mar 12, 2005 11:40 pm    Post subject: Gui Enhancements Reply with quote

Hi Chris,

what about adding a "FOCUS"-option to the Controls, so it is possible to focus a button by default.

If a button has focus, it would be nice that's also possible to navigate with the cursor-keys. Maybe the Options could have a group-option to let the cursor toggles only between the buttons of a group.

Tekl
Back to top
View user's profile Send private message Visit poster's website
Titan



Joined: 11 Aug 2004
Posts: 5390
Location: /b/

PostPosted: Sun Mar 13, 2005 12:26 am    Post subject: Reply with quote

There is GuiControl, Focus [...]
_________________

Back to top
View user's profile Send private message Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Sun Mar 13, 2005 12:26 am    Post subject: Reply with quote

Quote:
what about adding a "FOCUS"-option to the Controls, so it is possible to focus a button by default
The word "default" can appear in a button's option's to make it the default button:

Gui, Add, Button, Default, OK

Also, the script can focus a control via "GuiControl Focus".

Quote:
If a button has focus, it would be nice that's also possible to navigate with the cursor-keys.
Can you clarify? As far as I know, the current behavior of keyboard navigation conforms to standard practice. In other words, the tab and arrow keys should navigate the way users have come to expect.
Back to top
View user's profile Send private message Send e-mail
Tekl



Joined: 24 Sep 2004
Posts: 813
Location: Germany

PostPosted: Sun Mar 13, 2005 1:15 am    Post subject: Reply with quote

Quote:
The word "default" can appear in a button's option's to make it the default button:

Gui, Add, Button, Default, OK


Well, but the cursor will be in the edit box.

Quote:
Also, the script can focus a control via "GuiControl Focus".


Well, i just was looking in the gui-docs, shame on me. Embarassed

Quote:
Can you clarify? As far as I know, the current behavior of keyboard navigation conforms to standard practice. In other words, the tab and arrow keys should navigate the way users have come to expect.


For example use the Run-Command from the startmenu (Win+R). If you press tab the first time you will reach the ok-button. Now it is possible to use the cursorkeys to select buttons. I have a vertical list of Buttons less advanced users may expect to move focus with cursor-keys.

Tekl
Back to top
View user's profile Send private message Visit poster's website
Serenity



Joined: 07 Nov 2004
Posts: 1276

PostPosted: Sun Mar 13, 2005 11:44 am    Post subject: Reply with quote

Tekl, I think controls tab order are created according to their place/order in the script. You can also use the -TabStop option to have a control be ignored/skipped by the tab key.
_________________
"Anything worth doing is worth doing slowly." - Mae West
Back to top
View user's profile Send private message Visit poster's website
Tekl



Joined: 24 Sep 2004
Posts: 813
Location: Germany

PostPosted: Sun Mar 13, 2005 3:23 pm    Post subject: Reply with quote

Hi,

I don't want exclude something from the taborder but I want navigation with cursor-keys.

Tekl
Back to top
View user's profile Send private message Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Sun Mar 13, 2005 4:10 pm    Post subject: Reply with quote

Buttons are already navigable with the arrow/cursor keys. Perhaps you can try a short script such as the following to help explain how the navigation is improper or undesirable:

Gui, Add, Edit
Gui, Add, Button,, Button1
Gui, Add, Button,, Button2
Gui, Add, Button,, Button3
Gui, Show
return

GuiClose:
ExitApp
Back to top
View user's profile Send private message Send e-mail
Tekl



Joined: 24 Sep 2004
Posts: 813
Location: Germany

PostPosted: Sun Mar 13, 2005 4:24 pm    Post subject: Reply with quote

Hi Chris,

you're right, that works. In my script there are images infront of the buttons so AHK wont group the buttons. I create the Button/Image-List within a Loop. Maybe I have to separate image and button-creation in a two loops. But then I must know where to put the images. Relative to existing controls is only possible for the last control or one Section. Maybe numbering Sections would help. Or do you have a different idea?

Tekl

Gui, Add, Picture...
Gui, Add, Button,, Button1
Gui, Add, Picture...
Gui, Add, Button,, Button2
Gui, Add, Picture...
Gui, Add, Button,, Button3
Back to top
View user's profile Send private message Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Sun Mar 13, 2005 5:05 pm    Post subject: Reply with quote

I see what you mean. I think your idea of having two loops is best, but you're right that relative positioning then becomes a problem.

Although there might be better positioning options in a future version, for now I hope you can find some workaround, perhaps by storing positions temporarily in an array or comma-separated list.

Someone also suggested the ability to change the internal ordering of controls to fix navigation issues like this one. However, that is another feature that doesn't exist yet.
Back to top
View user's profile Send private message Send e-mail
Tekl



Joined: 24 Sep 2004
Posts: 813
Location: Germany

PostPosted: Sun Mar 13, 2005 5:55 pm    Post subject: Reply with quote

Hi Chris,

thanks for the idea with the array, I haven't thougt of this. Yes, TabOrder would be nice.

Tekl
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group