>Jim,
>
>Thanks again for your continued replies.
>
>My program has two problems :-
>
>1. How to check for an empty memo so that I can enable/disable Print and Export push buttons from the InteractiveChange event. If there is a lage amount of text (say more than 1 screen), the cursor in the memo edit box goes crazy after eack keystroke.
>
>2. I have a form with foreign charcters in a listbox, showing the actual character and its foreign representation. I want the user to pop up the form, say from a push button on another form or memu item, then programmatically insert the foreign character at the insertion point in the textbox, editbox, whatever. This is where the SelStart problem occurs.
>
Rex,
You need to check for the value property being empty to find out if the memo is empty, in the InteractiveChange you would;
IF EMPTY(THIS.Value)
* The memo is empty
ENDIF
As for your foreign character form, the problem you ave to overcome is that when your foriegn character fomr gets focus the editbox loses focus. Then when you return to the editbox the selstart is reset. You have to design a method of saving the selstart in the editbox before the other form is open so that you can restore it whne the editbox regains focus. How you choose to do this is dependent on how everything else works in your application.
You can create an editbox class for this purpose where you have a custom property for saving the selstart from the lostfocus event and restoring it in the gotfocus event.