IonicWind Software

IWBasic => General Questions => Topic started by: AdrianFox on December 20, 2008, 11:31:58 AM

Title: Restoring focus to last cursor position in an edit box
Post by: AdrianFox on December 20, 2008, 11:31:58 AM
I'm using a text edit box with a series of buttons which allow the entry of French characters, such as ÃÆ'Ã,¡, ÃÆ'Ã,¨ and ÃÆ'Ã,©.

All works ok except every time the button is pressed and the character added to the text in the edit window, focus is lost.

Although I can restore the focus to the edit box with setfocus,d1,1  the carat/cursor  is restored to the beginning of the text.

What do I need to do to restore the carat/cursor to the last text position after the  addition of the new character?

As 'ctrl-end' will take me to the end of the text, I've tried to find a way to use this, but with no success, especially as I can't seem to code for the relevant ascii keys.