How to set cursor position on a gadget
BlitzPlus Forums/BlitzPlus Beginners Area/How to set cursor position on a gadget
| ||
Hello, Using following programming works well, except that the input blinking cursor starts on the left side of the text gadged. I want the blinking cursor to be on the right side of the text thats written in the gadged (sorry for bad english, I spead dutch) So here's my piece of code : Function Question$(Message$,Answer$) FlushKeys() Local theKey = GetKey() Local win=CreateWindow (Message$,100,100,300,200,0,1) ;create window Local txtbox=CreateTextField(10,10,200,20,win) ;create textfield in that window ActivateGadget txtbox SetGadgetText txtbox,Answer$ ;set text in that textfield for info Local ok=CreateButton("OK",10,50,200,20,win) ;create button Local Done = False Local theID = 0 While Not Done theId=WaitEvent() ;wait for user action (in a form of event) If theId=Event_WindowClose Then End ;to quit program when we receive Window close event If theId=Event_GadgetAction And EventSource()=ok Then ; when ok is pressed Done = True Answer$ = TextFieldText$(txtbox) End If Wend FreeGadget Win Return Answer$ End |
| ||
http://www.blitzbasic.com/Community/posts.php?topic=25196 |