Editor initialization at app. start up time

General TRichView support forum. Please post your questions here
Post Reply
vega
Posts: 50
Joined: Fri Oct 26, 2007 6:29 am

Editor initialization at app. start up time

Post by vega »

I have the following problem :

When my app. starts, a RVE is right away at the disposal of the user to enter text. The problem is that this editor is not initialized properly (eg: empty font-size list box). For example, if the user enters text and clicks the [New] button (which uses rvActionNew1), he is not offered to save his work and his doc. is replaced by an empty one (properly initialized this time). Clicking the [New] button by code at Form.Activate time does not help. What's weird is that when text is typed in the first editor, the Changed property is True but rvActionSave is not triggered.

The question is : How can I present a properly initialized RVE at app. loading time. I don't want to force the user to click the [New] button himself before typing. I tried everything (I think) in the Form.Activate to no avail. (RVE.Clear, Format, ActionList1.ExecuteAction(rvActionNew1); automatically loading a RVF from disk etc.).

This may be a stupid question but I sure can't figure it out (blushing)...

Thanks in advance,

Dan

* * * * * *
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

If you use RichViewActions, call
rvActionNew1.ExecuteTarget(RVE);
when the application starts (in Form.OnCreate)
vega
Posts: 50
Joined: Fri Oct 26, 2007 6:29 am

Post by vega »

YES !

Thanks very much for a very quick reply.
Post Reply