Définit la largeur, en pixels, avec laquelle la ListBox peut défiler horizontalement
#include <GuiListBox.au3>
_GUICtrlListBox_SetHorizontalExtent ( $hWnd, $iWidth )
$hWnd | ID/handle du contrôle |
$iWidth | Largeur en pixels de la zone de défilement de la ListBox |
Pour utiliser cette fonction la ListBox doit avoir été défini avec le style $WS_HSCROLL.
_GUICtrlListBox_GetHorizontalExtent
#include <GUIConstantsEx.au3> #include <GuiListBox.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> Example() Func Example() Local $idListBox ; Crée une GUI GUICreate("List Box Set Horizontal Extent", 400, 296) $idListBox = GUICtrlCreateList("", 2, 2, 396, 296, BitOR($WS_BORDER, $WS_VSCROLL, $LBS_NOTIFY, $LBS_DISABLENOSCROLL, $WS_HSCROLL)) GUISetState(@SW_SHOW) ; Ajoute une chaîne longue _GUICtrlListBox_AddString($idListBox, "AutoIt v3 is a freeware BASIC-like scripting language designed for automating the Windows GUI.") ; Affiche "current horizontal extent" MsgBox($MB_SYSTEMMODAL, "Information", "Horizontal Extent: " & _GUICtrlListBox_GetHorizontalExtent($idListBox)) _GUICtrlListBox_SetHorizontalExtent($idListBox, 500) ; Affiche "current horizontal extent" MsgBox($MB_SYSTEMMODAL, "Information", "Horizontal Extent: " & _GUICtrlListBox_GetHorizontalExtent($idListBox)) ; Boucle jusqu'à ce que l'utilisateur quitte. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>Example