2 richviewedit control

General TRichView support forum. Please post your questions here
Post Reply
sr1111
Posts: 27
Joined: Thu Jan 31, 2008 12:18 pm

2 richviewedit control

Post by sr1111 »

I have two richviewedit, richviewedit1 and richviewedit2 for one form.

how can I control only one with item (save, open, fontnames, fontsize, paragraphs aligment, all items....) for two richviewedits

is there example or code

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

Post by Sergey Tkachenko »

Do you use RichViewActions?
sr1111
Posts: 27
Joined: Thu Jan 31, 2008 12:18 pm

Post by sr1111 »

yes. I do use for richviewactions
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

RichViewActions automatically work with the focused control. So when one of editors is focused (it has a blinking caret), all actions will work with it.

Some problems may occur when a different control (for example, button or combobox) is focused. In this case, without a special processing, you cannot tell which editor will be chosen by actions.

Solution: Place TRVAControlPanel on the form (there must be only one instance of this component in project; so if you have many forms, place it on the main form). Process OnEnter event for RichViewEdits. In this event, assign RVAControlPanel1.DefaultControl := TCustomRichViewEdit(Sender).
Post Reply