Obtient la largeur, en pixels, sur laquelle la liste déroulante d'une ComboBox peut défiler horizontalement
#include <GuiComboBox.au3>
_GUICtrlComboBox_GetHorizontalExtent ( $hWnd )
$hWnd | ID/handle du contrôle |
_GUICtrlComboBox_SetHorizontalExtent
#include <GuiComboBox.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> Global $g_idMemo Example() Func Example() Local $idCombo ; Crée une GUI GUICreate("ComboBox Get 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