Function Reference


_GUICtrlComboBox_GetDroppedWidth

Retrieve the minimum allowable width, of the ListBox of a ComboBox

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

Parameters

$hWnd Control ID/Handle to the control

Return Value

Success: the width, in pixels.
Failure: -1.

Remarks

The ComboBox must have $CBS_DROPDOWN or $CBS_DROPDOWNLIST style.

Related

_GUICtrlComboBox_SetDroppedWidth, _GUICtrlComboBoxEx_GetDroppedState

Example

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

Example()

Func Example()
    Local $idCombo

    ; Create GUI
    GUICreate("ComboBox Get Dropped Width", 400, 296)
    $idCombo = GUICtrlCreateCombo("", 2, 2, 396, 296)
    GUISetState(@SW_SHOW)

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

    ; Get Dropped Width
    MsgBox($MB_SYSTEMMODAL, "Information", "Dropped Width: " & _GUICtrlComboBox_GetDroppedWidth($idCombo))

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