WPCubed Product Support

Bullet lost on save / reopen

Note this is a repost from wptools5 forum as I made a mistake, sorry

I needed to change the default bullets to use a much smaller bullet than the default on,
This is the code I am using to get the bullets I want: (sets all bullet styles to the same style), this code is called when I clear the Document (called ParaText)

This works fine when editing the document and when previewing or printing.

Now as soon as I saveToFile, making sure it is in RTF format, if I reopen the document all bullets are lost (ie the formatting of the line stays, but the bullet itself does not show)

This is the code I am using to change the bullets.
Code:

paraText.Memo.RTFData.RTFProps.NumberStyles.ClearStyles;
paraText.Memo.RTFData.RTFProps.NumberStyles.clear;

for i := 1 to 9 do
  with TWPRTFNumberingStyle(paraText.Memo.RTFData.RTFProps.NumberStyles.Add) do
    begin
    if i = 1 then
      fBulletStyleid := id;
    Group := 0;
    Style := wp_circle;
    TextB := '';
    TextA := '•';
    Font := 'Times New Roman';
    Indent := 360 * i;
    UsePrev := true;
    end;
BulletChar := '•';
BulletIndent := 360;
BulletFont :=  'Times New Roman';

I have only just realised that this is happening, and we now have hundreds of docs w/o bullets, which is a big issue (for my client)

I am using wpTools 6 on D2010 and tried downloading today 6.11 from April 2010 and it does not make a difference.

Any idea ?

thanks in advance

Didier

#1 ♥ 0
4.4k Views 2 users read 2 min
support

Hi,

wp_bullet should be used instead of wp_circle.

UsePrev is used to create legal numbering, such as 1.
1.1 1.1.1 .... It is not supposed to be used with bulltes.

But this code is not correct in principle. You cannot modify the numbering by deleting the styles and adding new ones. The new ones can be used with new text or can be applied to old text. But this will not change existing numbering, just destroy it.

You should better modify the numberstyles, not add new items.

Julian

#2 ♥ 0

This makes sense, I'll give it a go then

thanks Julian

Didier

#3 ♥ 0
This category is archived. No new posts are possible.