Obtient l'index de l'�l�ment d'ancrage, celui o� d�marre la s�lection
#include <GuiListBox.au3>
_GUICtrlListBox_GetAnchorIndex ( $hWnd )
$hWnd | ID/handle du contr�le |
_GUICtrlListBox_SetAnchorIndex
#include <GUIConstantsEx.au3> #include <GuiListBox.au3> Example() Func Example() Local $iIndex, $idListBox ; Cr�e une GUI GUICreate("List Box Get Anchor Index", 400, 296) $idListBox = GUICtrlCreateList("", 2, 2, 396, 296) GUISetState(@SW_SHOW) ; Ajoute des cha�nes _GUICtrlListBox_BeginUpdate($idListBox) For $iI = 1 To 9 _GUICtrlListBox_AddString($idListBox, StringFormat("%03d : Random string", Random(1, 100, 1))) Next _GUICtrlListBox_EndUpdate($idListBox) ; D�finit l'index d'ancrage _GUICtrlListBox_SetAnchorIndex($idListBox, 2) ; Lit l'index d'ancrage $iIndex = _GUICtrlListBox_GetAnchorIndex($idListBox) _GUICtrlListBox_SetCurSel($idListBox, $iIndex) ; Boucle jusqu'� ce que l'utilisateur quitte. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>Example