Function Reference


_GUICtrlComboBox_SetCueBanner

Sets the cue banner text that is displayed for the edit control of a combo box

#include <GuiComboBox.au3>
_GUICtrlComboBox_SetCueBanner ( $hWnd, $sText )

Parameters

$hWnd Control ID/Handle to the control
$sText String that contains the text

Return Value

Success: True.
Failure: False.

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_GetCueBanner

Example

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

Global $g_idMemo
Example()

Func Example()
    Local $idCombo

    ; Create GUI
    GUICreate("ComboBox Set Cue Banner", 400, 296)
    $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