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.
Multiple Actionsbars with multiple richviewedits are magically remote controlled
-
- Posts: 4
- Joined: Mon Dec 09, 2019 1:18 pm
-
- Site Admin
- Posts: 17555
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Multiple Actionsbars with multiple richviewedits are magically remote controlled
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.
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.
-
- Posts: 4
- Joined: Mon Dec 09, 2019 1:18 pm
Re: Multiple Actionsbars with multiple richviewedits are magically remote controlled
That worked. Thanks for the detailed explanation.