Reputation: 8382
I found that it's quite easy with nsDialogs to set the focus to a specific control:
${NSD_SETFOCUS} $myHWnd
But is there also a way to select all the text in that control, so that when the user starts typing, what is already there is overwritten?
Upvotes: 2
Views: 295
Reputation: 8382
Turns out it's also quite easy using the standard NSIS function SendMessage
. You can simply send the EM_SETSEL message with 0 and -1 as parameters:
SendMessage $myHWnd ${EM_SETSEL} 0 -1
This will select all the text in the textbox.
Upvotes: 3