Page 1 of 1
Multiple Actionsbars with multiple richviewedits are magically remote controlled
Posted: Tue Dec 10, 2019 12:49 pm
by spang@xperttimer.de
I have a form with a RVControlPanel an Actionbar and a RichViewEdit. If I open multiple instances of that form and use the Actionbar of the first created form, it (magically) also changes the formating of the other open RichViews (that are bound to aonother ControlPanel). Even the buttons of the other actionbars are getting pressed when this happens.
I asume it has something to do with global styles, but I have no Idea how to prevent this behaviour.
I am using v17.6 of RV and v10.1 Berlin of Delphi.
Re: Multiple Actionsbars with multiple richviewedits are magically remote controlled
Posted: Tue Dec 10, 2019 1:20 pm
by Sergey Tkachenko
1) Each form must have its own set of actions.
2) Each action must be linked to TRVAControlPanel on its form explicitly, i.e. ControlPanel property of each action must be set.
3) If you use TRVStyleTemplateComboBox, assign its ControlPanel property as well.
(if you do not assign ControlPanel property, actions and components use the first created TRVAControlPanel, not a control panel on their form.
3) Assign the editor to RVAControlPanel.DefaultControl on the same form. Or assign the editor to Control property of all actions on this form (the effect is the same). Otherwise all action on all form will work with the focused RichViewEdit. Control property of TrvActionStyleInspector must be set.
4) Assign the editor to Editor property of all combo boxes (TRVStyleTemplateComboBox, TRVFontComboBox, TRVFontSizeComboBox) on the same form.
Actually, it is not necessary to use different TRVAControlPanels on each form. It is useful only if you want to set different values of some properties of TRVAControlPanels. If properties are identical, you can use a single TRVAControlPanel (but make sure that its form/datamodule is created before the editor forms).
If you use a single TRVAControlPanel, the suggestions above are changed to:
1) Each form must have its own set of actions.
2) Do not assign RVAControlPanel.DefaultControl. Assign the editor to Control property of all actions on this form.
3) Assign the editor to Editor property of all combo boxes (TRVStyleTemplateComboBox, TRVFontComboBox, TRVFontSizeComboBox) on the same form.
Re: Multiple Actionsbars with multiple richviewedits are magically remote controlled
Posted: Thu Dec 12, 2019 2:39 pm
by spang@xperttimer.de
That worked.
Thanks for the detailed explanation.