Jump to content

how can change tab order ??


Recommended Posts

Here is a way :

#include <GUIConstantsEx.au3>
#include <WinAPI.au3>

GUICreate("gui", 280, 170)

$b1 = GUICtrlCreateButton("Bouton1", 10, 10, 100, 25)
$b2 = GUICtrlCreateButton("Bouton2", 10, 50, 100, 25)
$b3 = GUICtrlCreateButton("Bouton3", 10, 90, 100, 25)
$bQuit = GUICtrlCreateButton("Exit", 170, 130, 100, 25 )
$bTabOrder = GUICtrlCreateButton("Arrange tab order", 10, 130, 150, 25 )

$i1 = GUICtrlCreateInput("", 120, 10, 150, 25)
$i2 = GUICtrlCreateInput("", 120, 50, 150, 25)
$i3 = GUICtrlCreateInput("", 120, 90, 150, 25)

Local $aOrder = [$b1, $i1, $b2, $i2, $b3, $i3, $bTabOrder, $bQuit]

GUISetState()

While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $GUI_EVENT_CLOSE
            ExitLoop
        Case $bTabOrder
            _GUISetTabOrder($aOrder)
    EndSwitch
WEnd


Func _GUISetTabOrder($aId)
    Local $hCtrl
    For $i = 0 To UBound($aId) - 1
        $hCtrl = (IsHWnd($aId[$i]) ? $aId[$i] : GUICtrlGetHandle($aId[$i]))
        _WinAPI_SetWindowPos($hCtrl, $HWND_BOTTOM, 0, 0, 0, 0,  BitOr($SWP_NOMOVE, $SWP_NOSIZE) )
    Next
EndFunc

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...