Page 1 of 1

RichViewActions - Bullet List Styles

Posted: Tue Jul 15, 2025 7:39 am
by JoelZ
Is it possible to modify the predefined styles in the “Bullets and Numbering” dialog?
I have also noticed the following problems, is there a way to solve them?
If I use the predefined book bullet and copy the text into word or save it as RTF, the symbol gets a different background:
Screenshot 2025-07-15 092509.png
Screenshot 2025-07-15 092509.png (712 Bytes) Viewed 443 times
A list with a graphic as a bullets can no longer be continued if it is saved as RTF and reloaded.

Re: RichViewActions - Bullet List Styles

Posted: Tue Jul 15, 2025 11:49 am
by Sergey Tkachenko
1) TRichView saves these bullets to RTF as simple pictures.
I do not remember what this solution was chosen instead of RTF's bullet-pictures. Most probably, MS Word resizes bullet-pictures in an uncontrollable way, and results do not look good for most pictures.
This is the reason why this list cannot be continued - it is not saved as a list.

2) This is TBitmap picture. In TRichView, this TBitmap is drawn transparently, replacing the color of bottom left pixel with transparency. But in RTF the bitmap is saved as it is.
I'll replace this bitmap with some image having a real transparency in one of future updates.

3)
These styles are hardcoded. They are defined in rvsTemplate1 (for bullets), rvsTemplate2 (for numbering) in ListGalleryRVFrm.dfm, and adjusted in code in InitBullets.
When the form is shown and applied, results are stored in TrvActionParaList. ModifiedTemplates[0] and [1], and when the dialog is shown next time, the list gallery is initialized from these ModifiedTemplates.
If you fill them initially, they will be used to initialize the dialog. Just create TRVStyle in code, assign to these properties, fill ListStyles properties of these TRVStyles. The action will free them itself.
Note that indents in TrvActionParaList properties are measured in RVAControlPanel.UnitsProgram. Normally, initially all sizes in actions are measured in pixels, and when the application starts, they are converted by calling RVA_ConvertToEMU or RVA_ConvertToTwips, if necessary.
This is not a simple solution, because you need to create all list templates yourself from scratch.