Function Reference


_GUICtrlComboBox_GetCueBanner

Gets the cue banner text displayed in the edit control of a combo box

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

Parameters

$hWnd Control ID/Handle to the control

Return Value

Success: the cue banner text.
Failure: an empty string "".

Remarks

The cue banner is text that is displayed in the edit control of a combo box when there is no selection.

Windows Vista or later.

Related

_GUICtrlComboBox_SetCueBanner

Example

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

Global $g_idMemo
Example()

Func Example()
        ; Create GUI
        GUICreate("ComboBox Get/Set Cue Banner (v" & @AutoItVersion & ")", 400, 296)
        Local $idCombo = GUICtrlCreateCombo("", 2, 2, 396, 296)
        _GUICtrlComboBox_SetCueBanner($idCombo, "Select an Item")
        $g_idMemo = GUICtrlCreateEdit("", 10, 50, 376, 234, $WS_VSCROLL)
        GUICtrlSetFont($g_idMemo, 9, 400, 0, "Courier New")
        GUISetState(@SW_SHOW)

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

        MemoWrite("Cue Banner: " & _GUICtrlComboBox_GetCueBanner($idCombo))

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

; Write a line to the memo control
Func MemoWrite($sMessage)
        GUICtrlSetData($g_idMemo, $sMessage & @CRLF, 1)
EndFunc   ;==>MemoWrite