Sets the cue banner text that is displayed for the edit control of a combo box
#include <GuiComboBox.au3>
_GUICtrlComboBox_SetCueBanner ( $hWnd, $sText )
$hWnd | Control ID/Handle to the control |
$sText | String that contains the text |
Success: | True. |
Failure: | False. |
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.
#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