March 28, 2024, 10:40:40 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Restoring focus to last cursor position in an edit box

Started by AdrianFox, December 20, 2008, 11:31:58 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

AdrianFox

December 20, 2008, 11:31:58 AM Last Edit: December 21, 2008, 06:00:40 AM by AdrianFox
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.




Adrian Fox