TE_focus Function (ROM Call 0xA8)

textedit.h

short TE_focus (TEXT_EDIT *te);

Highlightes the selected text in the editor, and gives the focus to it.

TE_focus is usually called after TE_select. It highlightes the selected text in the editor (associated with the structure pointed to by te), and gives the focus to it, so the selected text will become active (after this, any keypress will replace selected text with the newly pressed key). Returns TRUE if focusing was performed, and returns FALSE if not (for example, if the text was already focused).

Note: TE_focus also enables the cursor using CU_start if it was disabled. So, it is sometimes used after calling TE_select with Low == High, just to display the cursor.


Uses: CU_start, sf_width, WinBegin, WinFill, ROM Call 0x471
Used by: TE_handleEvent, TE_reopen, TE_reopenPlain, TE_select, cmd_disphome, cmd_input, cmd_inputstr, cmd_prompt, Dialog, EV_defaultHandler, HomeExecute, EV_quit, GT_Trace