UDF > GUI > GuiComboBox >


_GUICtrlComboBox_GetHorizontalExtent

Obtient la largeur, en pixels, sur laquelle la liste d�roulante d'une ComboBox peut d�filer horizontalement

#include <GuiComboBox.au3>
_GUICtrlComboBox_GetHorizontalExtent ( $hWnd )

Param�tre

$hWnd ID/handle du contr�le

Valeur de retour

Retourne la largeur de d�filement, en pixels.

En relation

_GUICtrlComboBox_SetHorizontalExtent

Exemple

#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