[GUI ComboBox] Sets the textual cue, or tip

Put simple Tips and Tricks that are not entire Tutorials in this forum
User avatar
jNizM
Posts: 3183
Joined: 30 Sep 2013, 01:33
Contact:

[GUI ComboBox] Sets the textual cue, or tip

Post by jNizM » 04 Aug 2021, 02:54

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

Send the CB_SETCUEBANNER message to the ComboBox control

Code: Select all

MyGui := Gui()

MyGui.AddEdit("w300")   ; focused control to show the combobox cue text

Cb01 := MyGui.AddComboBox("w300", ["CB 1", "CB 2", "CB 3"])
CB_SETCUEBANNER(Cb01, "ComboBox Control Cue Text")

MyGui.Show()


CB_SETCUEBANNER(handle, string)
{
	static CBM_FIRST       := 0x1700
	static CB_SETCUEBANNER := CBM_FIRST + 3

	SendMessage(CB_SETCUEBANNER, 0, StrPtr(string), handle)
}

Image


It is already on the wish list for v2 (https://www.autohotkey.com/boards/viewtopic.php?t=70852)
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile

User avatar
Drugwash
Posts: 850
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania
Contact:

Re: [GUI ComboBox] Sets the textual cue, or tip

Post by Drugwash » 06 Aug 2021, 06:28

Remember this...? 8-)
I wonder if it still works at all under Win10+.
Part of my AHK work can be found here.

Post Reply

Return to “Tips and Tricks”