I have just started using NSIS - thanks for a great piece of software.
I have seen a number of posts on setting focus but, perhaps because I am new, they seem to suggest different ways. I would like to understand which is the best way to set the focus to a text box.
I have a custom page with 2 textboxes which have to be filled in. When the user clicks 'Next' and one of the textboxes is empty, I would like set the focus to the empty textbox.
My code quite happily catches when a textbox is empty and keeps the user on the page (see below), but to make the interface more user friendly I would like to have the cursor in the empty textbox too:
Function ValidateUserRegistrationPage
ReadINIStr $R0 "$PLUGINSDIR\User Registration.ini" "Field 3" "State"
StrCmp $R0 "" 0 +3
MessageBox MB_ICONEXCLAMATION|MB_OK "Please enter your name."
Abort
ReadINIStr $R0 "$PLUGINSDIR\User Registration.ini" "Field 4" "State"
StrCmp $R0 "" 0 +3
MessageBox MB_ICONEXCLAMATION|MB_OK "Please enter company."
Abort
FunctionEnd
I have seen this post below but it seems to mention different ways to do it (e.g. "From version 2.24 InstallOptions has native FOCUS flag") - how do i use that?
Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.
Thanks in advance for any help.