Hi,
I load a TRichViewEdit from a database, then I want the caret be visible at the end of the text. I try
rve.MoveCaret(rvcmBottom, false);
but the caret remains invisible.
How to proceed ?
Thanks
Make the caret visible
-
- Site Admin
- Posts: 17602
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Make the caret visible
1. Make sure that the editor is formatted. Call rve.Format; (this method moves the caret to the end of the document, so MoveCaret is redundant).
2. Probably the editor is not focused. Call rve.SetFocus.
2. Probably the editor is not focused. Call rve.SetFocus.
Re: Make the caret visible
rve.Format was done.
The key is really rve.SetFocus : the caret is now visible.
But, strangely, it blinks 5 times then remains frozen (visible but not blinking).
Thank you
The key is really rve.SetFocus : the caret is now visible.
But, strangely, it blinks 5 times then remains frozen (visible but not blinking).
Thank you
Re: Make the caret visible
That's a Windows OS thing. The caret in all edit controls stops blinking. A few custom programs override this, and you can change how long it blinks in the registry but I wouldn't recommend it. You can also use the custom caret in the TRichViewEdit to keep it blinking. Sergey can tell you more about that or I think it's in the online help file too.
Stan