Textfield Cursor
BlitzPlus Forums/BlitzPlus Programming/Textfield Cursor
| ||
Hello! SETGADGETTEXT textfield, string$ How can i set the position of the cursor at the end of the string? Any hints? Greetings sky009 |
| ||
This should help:;put these two lines into your user32.decls file ;.lib "user32.dll" ;SendMessage%(hwnd, msg, wParam, mParam):"SendMessageA" Function SelectText(textgad,start,fin=-1) If fin=-1 Then fin = start ;Local EM_SETSEL=$B1 sendmessage(QueryObject(textgad,1),$B1,start,fin) End Function |
| ||
Thanks Masterbreaker! And know the same without marking the string! Grettings sky009 |
| ||
SendMessage QueryObject(TextGad,1),$B1,Len(TextFieldText(TextGad)),Len(TextFieldText(TextGad)) |
| ||
Just dont use the last parameter of SelectText() and it does it for you. |