D�finit la largeur, en pixels, sur laquelle la liste d�roulante peut subir un d�filement horizontal
#include <GuiComboBox.au3>
_GUICtrlComboBox_SetHorizontalExtent ( $hWnd, $iWidth )
$hWnd | ID/handle du contr�le |
$iWidth | Indique la largeur de d�filement de la liste, en pixels |
Si la largeur de la liste d�roulante est inf�rieure � $iWidth, la barre de d�filement horizontale d�place horizontalement les �l�ments de la liste d�roulante.
Si la largeur de la liste d�roulante est �gale ou sup�rieure � $iWidth, la barre de d�filement horizontale est cach�e ou, d�sactiv�e si la ComboBox a le style $CBS_DISABLENOSCROLL.
_GUICtrlComboBox_GetHorizontalExtent
#include <GuiComboBox.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> Example() Func Example() Local $idCombo ; Cr�e une GUI GUICreate("ComboBox Set Horizontal Extent", 400, 296) $idCombo = GUICtrlCreateCombo("", 2, 2, 396, 296, BitOR($CBS_SIMPLE, $CBS_DISABLENOSCROLL, $WS_HSCROLL)) GUISetState(@SW_SHOW) ; Ajoute des fichiers _GUICtrlComboBox_BeginUpdate($idCombo) _GUICtrlComboBox_AddDir($idCombo, @WindowsDir & "\*.exe") _GUICtrlComboBox_EndUpdate($idCombo) ; Obtient Horizontal Extent MsgBox($MB_SYSTEMMODAL, "Information", "Horizontal Extent: " & _GUICtrlComboBox_GetHorizontalExtent($idCombo)) ; D�finit Horizontal Extent _GUICtrlComboBox_SetHorizontalExtent($idCombo, 500) ; Obtient Horizontal Extent MsgBox($MB_SYSTEMMODAL, "Information", "Horizontal Extent: " & _GUICtrlComboBox_GetHorizontalExtent($idCombo)) ; Boucle jusqu'� ce que l'utilisateur quitte Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>Example