In the Demo appears the dialog “Bullets and Numbering”. Then the dialog “customize list” to change e.g. “Bullet position”. Its very fine.
How can I configure this dialog to the design time?
Is possible at run time to save the changing permanent in the editor?
How can I add a new bullet permanent at design time or run time?
Actionlist Demo Bullets
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
I can explain how it works.
There are two hard-coded lists (for bullets and for numbering): in TfrmRVListGallery.rvsTemplate1.ListStyles and TfrmRVListGallery.rvsTemplate2.ListStyles
(ListGalleryRVFrm.pas)
They are initialized when the form is created. They are always initiated with the same values.
Also, TrvActionParaList have two lists (for bullets and for numbering):
ModifiedTemplates: array [0..1] of TRVStyle.
When this action shows the list dialog for the first time, its properties are filled from TfrmRVListGallery's lists. For subsequent executions o this action, only ModifiedTemplates are used. When the user modifies a list, changes are saved in ModifiedTemplates as well.
So, if you change ModifiedTemplates, they will be used.
You can do it in this way:
The same for Act.ModifiedTemplates[1] (list of numbering).
The both ListStyles must have 7 lists. The recommended count of levels in each list is 9.
There are two hard-coded lists (for bullets and for numbering): in TfrmRVListGallery.rvsTemplate1.ListStyles and TfrmRVListGallery.rvsTemplate2.ListStyles
(ListGalleryRVFrm.pas)
They are initialized when the form is created. They are always initiated with the same values.
Also, TrvActionParaList have two lists (for bullets and for numbering):
ModifiedTemplates: array [0..1] of TRVStyle.
When this action shows the list dialog for the first time, its properties are filled from TfrmRVListGallery's lists. For subsequent executions o this action, only ModifiedTemplates are used. When the user modifies a list, changes are saved in ModifiedTemplates as well.
So, if you change ModifiedTemplates, they will be used.
You can do it in this way:
Code: Select all
// modifying the list of bullets
Act.ModifiedTemplates[0].Free;
Act.ModifiedTemplates[0] := TRVStyle.Create(nil);
Act.ModifiedTemplates[0].Units := act.GetControlPanel.UnitsProgram;
Act.ModifiedTemplates[0].TextStyles.Clear;
Act.ModifiedTemplates[0].ParaStyles.Clear;
Fill Act.ModifiedTemplates[0].ListStyles here
The both ListStyles must have 7 lists. The recommended count of levels in each list is 9.
Hi Sergey,
I understand. The action “rvActionParaBullets” has not the same list like “rvActionParaList”?
The bullets appears on the left site (MarkerIndent = 0) when the action “rvActionParaBullets” executed. It is possibly the StyleList to initialize for a MarkerIndent > 0 (LeftIndent and FirstIndent the same proportion (hard-coded too))? In your help it is a “property MarkerIndent: TRVStyleLength;”. Are the properties attainable?
I understand. The action “rvActionParaBullets” has not the same list like “rvActionParaList”?
The bullets appears on the left site (MarkerIndent = 0) when the action “rvActionParaBullets” executed. It is possibly the StyleList to initialize for a MarkerIndent > 0 (LeftIndent and FirstIndent the same proportion (hard-coded too))? In your help it is a “property MarkerIndent: TRVStyleLength;”. Are the properties attainable?
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
TrvActionParaBullets and TrvActionParaNumbering do not display a dialog.
They work like a switch: they apply the specified list, or remove lists from the selection. The list is specified in their ListLevels property, you can change them.
TrvActionParaList displays "bullets and numbering" dialog. When it is applied, the action can modify ListLevels property in TrvActionParaBullets or TrvActionParaNumbering on the same form (depending on the type of a list to apply). This feature can be disabled if you assign rvActionParaList.UpdateAllActionsOnForm = False.
They work like a switch: they apply the specified list, or remove lists from the selection. The list is specified in their ListLevels property, you can change them.
TrvActionParaList displays "bullets and numbering" dialog. When it is applied, the action can modify ListLevels property in TrvActionParaBullets or TrvActionParaNumbering on the same form (depending on the type of a list to apply). This feature can be disabled if you assign rvActionParaList.UpdateAllActionsOnForm = False.
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
TrvActionParaBullets.ListLevels and TrvActionParaNumbering.ListLevels are published properties. You can modify them at designtime using Object Inspector - double click the ActionList, find these actions (they are in "RVE List" group and change properties).
Or you can change them in code when the application starts. But note that initially all sizes in actions are measured in pixels. In FormCreate of ActionTest demos, all sizes of all actions are converted to twips by calling RVA_ConvertToTwips. So make sure that you use correct sizes for indents.
Or you can change them in code when the application starts. But note that initially all sizes in actions are measured in pixels. In FormCreate of ActionTest demos, all sizes of all actions are converted to twips by calling RVA_ConvertToTwips. So make sure that you use correct sizes for indents.