Page 2 of 2
Re: Append many RichView files in an other RichView file
Posted: Fri Jun 28, 2024 7:54 am
by Sergey Tkachenko
Can you send me your project to email richviewgmailcom?
Re: Append many RichView files in an other RichView file
Posted: Fri Jun 28, 2024 7:57 am
by sorega2022
i cannot send you the whole project. You cannot do anything without database. but i can send you the .pas of the RichViewEditor. Is it that what you want?
Re: Append many RichView files in an other RichView file
Posted: Sat Jun 29, 2024 9:28 am
by sorega2022
i remembered now, that in my RichViewEditor is no style template. In your sample i can click NEW or load a file and i have a template. Where does it coming from? Perhaps there is missing in my source code. Which line in my source code opens this style template? I thought it is cmbStyles.Localize.
I controlled the whole source code, but i cannot find anything missing. Do you have an idea what that can be?
Re: Append many RichView files in an other RichView file
Posted: Sat Jun 29, 2024 11:14 am
by sorega2022
i am testing the RichViewEditor. i think there is the connection between the buttons above to the RichViewEdit missing. If i select a text and click on bold, not reaction at the text. The same with font and font size. If i close there is no question to save. If i start the RichViewEditor again, the buttons are all clicked but the text has no format.
Where is the connection between these components? In RVAControlPanel and RVStyle and ActionList there are all needed connections.
Do you have some ideas?
Re: Append many RichView files in an other RichView file
Posted: Sat Jun 29, 2024 8:23 pm
by Sergey Tkachenko
I think the actions are applied to an editor on another form.
How many instances of this form do you create?
Do you have other forms containing TRVAControlPanel component?
On this form, RVAControlPanel1 is linked to RichViewEdit1 explicitly (because RVAControlPanel1.DefaultControl = RichViewEdit1).
But actions are not linked to RVAControlPanel1: ControlPanel property of actions is not assigned (like it is in the original demo).
It is ok if you have a single form with RVAControlPanel1, but not ok if you have multiple forms like this.
All actions (on all forms) that have unassigned ControlPanel properties work with the active TRVAControlPanel component.
The first created RVAControlPanel1 becomes active.
You can make another RVAControlPanel active (using Activate method).
However, the best solution is to link actions to TRVAControlPanel on the form explicitly.
Just assign ControlPanel property of all actions on this form equal to RVAControlPanel1. Also, assign cmbStyles.ControlPanel = RVAControlPanel1.
Re: Append many RichView files in an other RichView file
Posted: Sat Jun 29, 2024 8:28 pm
by Sergey Tkachenko
As for named styles (StyleTemplates).
The actions use StyleTemplates if the target editor has UseStyleTemplates property = True.
The default set of StyleTemplates (applied by "New" command) is in rvActionNew1.StyleTemplates property.
Re: Append many RichView files in an other RichView file
Posted: Sun Jun 30, 2024 4:38 am
by sorega2022
Oh. Thank you. Your tool is very sensible. I put only RVAControlPanel1.Activate in the first line of the Form.Create and all was ok. That was the missing connection. I can change to justify and i can change the format. The saving is ok und on printing i have all these changes.
Now i have still the problem with the margins, i told some messages before. I cannot change it. The TSRichViewEdit takes always its defaults.
I can imagine that there is another trick to fix the problem. But i am not so firm till now to remember the right work-flow.
Re: Append many RichView files in an other RichView file
Posted: Sun Jun 30, 2024 9:30 am
by Sergey Tkachenko
I need a code sample reproducing the problem.
Normally, when you assign a new value, like this:
Code: Select all
SRV.PageProperty.LeftMargin := 4;
changes are applied immediately, and you can see the result.
(so, if you need to change multiple margins, it's better to disable reformatting temporarily:
Code: Select all
ActiveEditor.CanUpdate := False;
SRV.PageProperty.LeftMargin := 4;
SRV.PageProperty.RightMargin := 4;
SRV.CanUpdate := True;
)
Re: Append many RichView files in an other RichView file
Posted: Sun Jun 30, 2024 11:23 am
by sorega2022
Thank you very much. The CanUpdate := true was that what i needed.
The next problem is to set the table. do you have some special samples for generating a table? to work with bestwidth and so on
Re: Append many RichView files in an other RichView file
Posted: Sun Jun 30, 2024 1:15 pm
by Sergey Tkachenko
Check the demo in TRichView\Demos\DelphiUnicode\Editors\Edito 1\
It can insert several sample tables generated in code.
Re: Append many RichView files in an other RichView file
Posted: Tue Jul 02, 2024 2:52 pm
by sorega2022
At creation of a table i have to fix how many rows and cols i will have. I know the cols, but i dont know the rows. is it possible to change this while filling the table? can i change the count of rows while doing?
Re: Append many RichView files in an other RichView file
Posted: Tue Jul 02, 2024 7:31 pm
by Sergey Tkachenko