Page 1 of 1
2 richviewedit control
Posted: Mon Dec 22, 2008 1:54 am
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
Posted: Mon Dec 22, 2008 4:41 pm
by Sergey Tkachenko
Do you use RichViewActions?
Posted: Mon Dec 22, 2008 5:07 pm
by sr1111
yes. I do use for richviewactions
Posted: Mon Dec 22, 2008 5:25 pm
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).