Padding for bulleted does not work

Hi there,

i have a code like this:

List lst = doc.Lists.Add(ListTemplate.BulletSquare);
builder.ListFormat.List = lst;
builder.Write(ssAAssetCritical[i, j]);
builder.ListFormat.RemoveNumbers();

, and padding:

builder.CellFormat.SetPaddings(ConvertUtil.InchToPoint(0.06) , ConvertUtil.InchToPoint(0.06), ConvertUtil.InchToPoint(0.06), ConvertUtil.InchToPoint(0.06));
builder.ParagraphFormat.SpaceBefore = 0;
builder.ParagraphFormat.SpaceAfter = 0;

It seems the format does not work, but for normal

text (NO bullet square) it works. I attach the pics.

regards

@ibox Could you please attach your document here for our reference? Most likely you should set list label position or left indent of the paragraph. But it is hard to say using screenshot.

DISP SRA (15).docx (264.5 KB)

here u are,
thank u Sir

@ibox You can use the following code to shift the list items left:

if (p.IsListItem)
{
    p.ListFormat.ListLevel.NumberPosition = 0;
    p.ListFormat.ListLevel.TabPosition = 10;
    p.ListFormat.ListLevel.TextPosition = 10;
}

Thank u, Sir
I try
regards

1 Like

Thank You, Sir
It works.

regards

1 Like