# Function Reference

# _GUICtrlComboBox_GetHorizontalExtent

Gets the width, in pixels, that the ListBox of a ComboBox control can be scrolled horizontally

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

## Parameters

$hWnd | Control ID/Handle to the control

## Return Value

Returns the scrollable width, in pixels.

## Related

_GUICtrlComboBox_SetHorizontalExtent

## Example

    #include <GuiComboBox.au3>
    #include <GUIConstantsEx.au3>
    #include <MsgBoxConstants.au3>
    #include <WindowsStylesConstants.au3>

    Example()

    Func Example()
        ; Create GUI
        GUICreate("ComboBox Get/Set HorizontalExtent (v" & @AutoItVersion & ")", 420, 296)
        Local $idCombo = GUICtrlCreateCombo("", 2, 2, 416, 296, BitOR($CBS_SIMPLE, $CBS_DISABLENOSCROLL, $WS_HSCROLL))
        GUISetState(@SW_SHOW)

        ; Add files
        _GUICtrlComboBox_BeginUpdate($idCombo)
        _GUICtrlComboBox_AddDir($idCombo, @WindowsDir & "\*.exe")
        _GUICtrlComboBox_EndUpdate($idCombo)

        ; Get Horizontal Extent
        MsgBox($MB_SYSTEMMODAL, "Information", "Horizontal Extent: " & _GUICtrlComboBox_GetHorizontalExtent($idCombo))

        ; Set Horizontal Extent
        _GUICtrlComboBox_SetHorizontalExtent($idCombo, 500)

        ; Get Horizontal Extent
        MsgBox($MB_SYSTEMMODAL, "Information", "Horizontal Extent: " & _GUICtrlComboBox_GetHorizontalExtent($idCombo))

        ; Loop until the user exits.
        Do
        Until GUIGetMsg() = $GUI_EVENT_CLOSE
        GUIDelete()
    EndFunc   ;==>Example