I have two separate forms with separate RVAControlPanels, RVStyles, RVPrints, etc.
I noticed when I set the default controls of the RVAControlPanel on one form, it
changes it on the other form as well, which is the wrong richviewedit for that form. What is the best practice? Should I use common controls in a datamodule or
separate controls per form? Thanks.
How many RVAControlPanels
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Only one RVAControlPanel for project.
This component just provides access to global variables. So, when you change properties on one component in the project, these properties are changed in all components.
And do not open several forms containing RVAControlPanel in Delphi IDE at the same time, the same problem will occur.
This component just provides access to global variables. So, when you change properties on one component in the project, these properties are changed in all components.
And do not open several forms containing RVAControlPanel in Delphi IDE at the same time, the same problem will occur.
Thanks for the quick reply. I now have one RVAControlPanel in a datamodule.
It's default control, RVAddictSpell3, and RVPrint properties are set in the OnShow
event of all forms that use richviewedits. Hopefully, this is the best practice. My
question now is, should I also do the same with my RVStyles, RVPrints, ActionLists,
ImageLists, etc or is it best practice to duplicate them in each form? Thanks
It's default control, RVAddictSpell3, and RVPrint properties are set in the OnShow
event of all forms that use richviewedits. Hopefully, this is the best practice. My
question now is, should I also do the same with my RVStyles, RVPrints, ActionLists,
ImageLists, etc or is it best practice to duplicate them in each form? Thanks
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
It is only TRVAControlPanel. All other components can be created in as many copies as you need.
But since they use some resources, using a single copy in a datamodule is a good idea. Except for TRVStyle. Connect each editor with its own TRVStyle.
A common RVStyle for several editors can be used only in special mode, when a set of styles is fixed and not changed.
But since they use some resources, using a single copy in a datamodule is a good idea. Except for TRVStyle. Connect each editor with its own TRVStyle.
A common RVStyle for several editors can be used only in special mode, when a set of styles is fixed and not changed.