
When nothing is typed into the text box, the placeholder text is shown. Otherwise, whatever is entered into the edit control will automatically replace the placeholder text with what you type.
Posted 31 January 2012 - 11:38 PM

Posted 01 February 2012 - 12:42 AM
Posted 01 February 2012 - 12:51 AM
Posted 01 February 2012 - 12:56 AM
Posted 01 February 2012 - 05:45 AM
Gui, Margin, 20, 20
Gui, Font, s10 Bold
Gui, Add, Text, , Name
Gui, Font, Normal
Gui, Add, Edit, xm y+10 w150 hwndHED1
SetEditCueBanner(HED1, "First")
Gui, Add, Edit, x+10 yp wp hwndHED2
SetEditCueBanner(HED2, "Last")
Gui, Show, , EM_SETCUEBANNER
Return
GuiClose:
ExitApp
SetEditCueBanner(HWND, Cue) { ; requires AHL_L
Static EM_SETCUEBANNER := (0x1500 + 1)
Return DllCall("User32.dll\SendMessageW", "Ptr", HWND, "Uint", EM_SETCUEBANNER, "Ptr", True, "WStr", Cue)
}
Posted 01 February 2012 - 12:11 PM
Posted 02 February 2012 - 07:46 AM
Posted 02 February 2012 - 08:08 AM
Gui, Margin, 20, 20
Gui, Font, s10 Bold
Gui, Add, Text, , Name
Gui, Font, Normal
;Gui, Show,x10 y10 h100 w350 , EM_SETCUEBANNER
Gui, Add, Edit, xm y+10 w150 hwndHED1 vEdit1
SetEditCueBanner(HED1, "First")
Gui, Add, Edit, x+10 yp wp hwndHED2 vEdit2
SetEditCueBanner(HED2, "Last")
Gui, Add, Edit,x0 y0 h0 w0 vEmpty1 ; not visible editfield set focus here
Gui, Show, , EM_SETCUEBANNER
GuiControl,1:Focus,empty1 ; see two edits gray First Last
;GuiControl,1:Focus,edit2
Return
GuiClose:
ExitApp
SetEditCueBanner(HWND, Cue) { ; requires AHL_L
Static EM_SETCUEBANNER := (0x1500 + 1)
Return DllCall("User32.dll\SendMessageW", "Ptr", HWND, "Uint", EM_SETCUEBANNER, "Ptr", True, "WStr", Cue)
}