Jump to content
Sign in to follow this  
enaiman

Tab stops

Recommended Posts

enaiman

Sorry if I ask an obvious question but the search in the General Help did not return any solution.

I am trying to select different controls on my GUI by pressing the TAB key.

It does work but the order of selected controls I guess is the order they were created (going to next in line control handle?)

I have noticed a "Tab Order" entry field in Koda Form Designer and I did try to change that value to what I wanted - unfortunately it does not have any effect.

Is there something I am missing here?

Thanks,


SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites
enaiman

Well, I'll have to answer myself to my post - about how many times does that happen to anybody? to get yourself the answer right after asking for help?

It looks like the tab order is given indeed by the control handle and the order you put them in the script will be the one followed by the tab key presses. That is good and bad because sometimes I need to group controls in my script in order to improve script's readability ... :(

I guess I can live with that.

Extra question - any way to make a control (icon in my case) not selectable by tab keypress?

Thanks,


SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites
PhoenixXL

Check the following

#include <GUIConstants.au3>
#include <WindowsConstants.au3>

GUICreate("", 300, 500)

$iLbl = GUICtrlCreateLabel("Label.", 10, 10, -1, -1, $WS_TABSTOP) ;Labels don't have this style because you can't differentiate when the label is active or not.

$iBtn = GUICtrlCreateButton("Button", 10, 40) ;Lets remove the stye from the button, this has to be called explicitly since $WS_TABSTOP style is forced upon creation by Autoit.
GUICtrlSetStyle(-1, 0) ;Removed $WS_TABSTOP

$iEdit = GUICtrlCreateEdit("Edit", 10, 75, 100, 300)
GUISetState()

;So now when you press TAB button the focus would be shifted from Label and Edit.

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            ExitLoop
    EndSwitch
    Sleep(10)
WEnd

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Share this post


Link to post
Share on other sites
enaiman

Wow, that's really nice, simple and effective.

Removing the style from button works very well.

Thanks a lot.


SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×