trichview.support
Re: TRichView.Clear while it is active |
Author |
Message |
Sergei |
Posted: 09/08/2003 12:10:14 >When do call TRichView.Clear? Inside ComboBox.OnClick/OnChange? >TRichView.Clear destroys this ComboBox, and VCL does expect this inside >ComboBox.OnClick/OnChange. > >If the solution with activecontrol works - use it. >Another solution - to post a message to the form (using PostMessage) and >clear the document in this message handler. Sorry I didn't mention it, of course I post a message to the control to clear and refresh it, sure it would throw an exception trying to free a control while executing its method. The exception is thrown only when the RichView is active I run a simple test: post a message to RichView to refresh, but called Clear after a 5 sec delay. An exception was thrown after 5 sec. If I pressed any button on the form (doing nothing, just to remove focus from the RichView document), everything worked fine. Anyway, I'm happy with my workaround, so nevermind. |
Powered by ABC Amber Outlook Express Converter