[GUI Edit] 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 Edit] Sets the textual cue, or tip

04 Aug 2021, 02:47

Sets the textual cue, or tip, that is displayed by the edit control to prompt the user for information.

Send the EM_SETCUEBANNER message to the Edit control

Code: Select all

MyGui := Gui()

Edt01 := MyGui.AddEdit("w300")
EM_SETCUEBANNER(Edt01, "Edit Control Cue Text", 1)   ; TRUE if the cue banner should show even when the edit control has focus

Edt02 := MyGui.AddEdit("w300")
EM_SETCUEBANNER(Edt02, "Edit Control Cue Text")      ; FALSE is the default behavior the cue banner disappears when the user clicks in the control

MyGui.Show()


EM_SETCUEBANNER(handle, string, option := false)
{
	static ECM_FIRST       := 0x1500
	static EM_SETCUEBANNER := ECM_FIRST + 1

	SendMessage(EM_SETCUEBANNER, option, 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

Return to “Tips and Tricks”

Who is online

Users browsing this forum: No registered users and 4 guests