[SOLVED] String Gadget Text Select Not Working
Posted: Sat Oct 08, 2011 8:53 pm
Hi AllWill only work if I put my code in the right place...Nexus = Doofus (I am tired?)
thanks in advance! Have trawled forums and found how to select text but it is not working? Can anyone point me in the right direction:
Code: Select all
UserName = GetGadgetText(#LoginUserNameString)
PassWord = GetGadgetText(#LoginPWString)
UserNameLength = Len(Trim(UserName))
PassWordLength = Len(Trim(PassWord))
If UserNameLength = 0 Or PassWordLength = 0
MessageRequester("Error","User Name & Password Cannot be Blank!",#PB_MessageRequester_Ok)
If UserNameLength = 0
;SelectAll(#LoginUserNameString)
;SetActiveGadget(#LoginUserNameString)
SendMessage_(GadgetID(#LoginUserNameString),#EM_SETSEL,0,-1)
ElseIf PassWordLength = 0
;SelectAll(#LoginPWString)
;SetActiveGadget(#LoginPWString)
SendMessage_(GadgetID(#LoginPWString),#EM_SETSEL,0,-1)
EndIf
Else