Hallo, kann man in AHK einem EDIT einen Ghost-Text hinzufügen, welcher beim ersten Tastendruck diesen gegen den zu schreibenden Text wechselt?
EDIT Ghost-Text Topic is solved
Moderator: jNizM
Re: EDIT Ghost-Text
Ich denke du solltest über die Farbgebung (und ein event) gehen.
Re: EDIT Ghost-Text
Missverständnis!
Last edited by Rohwedder on 20 Mar 2021, 04:06, edited 1 time in total.
Re: EDIT Ghost-Text Topic is solved
Moin,
dafür gibt es eine spezielle Nachricht: EM_SETCUEBANNER.
dafür gibt es eine spezielle Nachricht: EM_SETCUEBANNER.
Code: Select all
#NoEnv
Gui, Margin, 50, 10
Gui, Add, Edit, w200 vEDV hwndEDH
EM_SETCUEBANNER(EDH, "Schreib eine Nachricht")
Gui, Show, , EM_SETCUEBANNER
Return
GuiClose:
ExitApp
; ======================================================================================================================
; Sets the textual cue, or tip, that is displayed by the edit control to prompt the user for information.
; Text - the text to display as the textual cue.
; ======================================================================================================================
EM_SETCUEBANNER(HWND, Text) {
; EM_SETCUEBANNER = 0x1501 -> msdn.microsoft.com/en-us/library/bb761639(v=vs.85).aspx
Return DllCall("SendMessage", "Ptr", HWND, "UInt", 0x1501, "Ptr", True, "WStr", Text, "Ptr")
}
Re: EDIT Ghost-Text
Das ist ja cool.
Ich habe so etwas bisher mit einem zusätzlichen TEXT Element gemacht, das, so lange das INPUT Element leer ist, angezeigt wird und an sonsten HIDDEN ist.
Gucky.
Ich habe so etwas bisher mit einem zusätzlichen TEXT Element gemacht, das, so lange das INPUT Element leer ist, angezeigt wird und an sonsten HIDDEN ist.
Gucky.
Who is online
Users browsing this forum: effel and 56 guests