Free Support Forum - aspose.com

Are Indented numbered bullet lists possible

Is it posssible to created indented number bullet list like this:

1. bullet point example start

1. bullet point example

2. bullet point example

3. bullet point example

1. bullet point example

2. bullet point example

2. bullet point example end

I'm coding in Java and I have tried manipulating the start with variable in the bullet points but to no avail. If you can indent new numbered bullet lists can you also mixes bullet points and bullet numbers.

Dear Harry,

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

To create numbered bullets, please see this thread.

http://www.aspose.com/community/forums/thread/125417/adding-numbered-bulleted-paragraphs.aspx

To now how to out-dent text, please see this thread.

http://www.aspose.com/community/forums/thread/137080/how-to-outdent-text-with-aspose.slides.aspx

The indentation is not a problem now thanks, however numbering with indentation remain a problem I want to code a list like this

1. Example paragraph 1

1. Example paragraph 2

2. Example paragraph 3

However I get this instead

1. Example paragraph 1

2. Example paragraph 2

3. Example paragraph 3

I need the outdented list to start of at 1 again and not carry on the count as it would in a normal ordered list.

Regards

Harry

PS. I previously posted this via the wrong mesage sorry.

You should make use of Paragraph.setDepth() propert in JAVA or Paragraph.Depth in .NET.

Please see the JAVA code below and its ouput presentation.

JAVA

-------------------------------------------------------------------------------

public static void IndentedNumberedBullets() throws Exception

{

Presentation pres = new Presentation();

Slide sld = pres.getSlideByPosition(1);

com.aspose.slides.Rectangle rect = sld.getShapes().addRectangle(100, 100, 3000, 2000);

rect.getLineFormat().setShowLines(false);

TextFrame tf = rect.addTextFrame(" ");

Paragraph para = tf.getParagraphs().get(0);

para.setHasBullet((short)1);

para.setBulletType(BulletType.NUMBERED);

para.setNumberedBulletStyle(NumberedBulletStyle.BULLET_ARABIC_PERIOD);

para.setNumberedBulletStartWith((short)1);

para.setText("Example paragraph 1");

Paragraph newPara = new Paragraph(para);

newPara.setDepth((short)1);

newPara.setBulletOffset((short)100);

newPara.setTextOffset((short)100);

newPara.setText("Example sub paragraph 1");

tf.getParagraphs().add(newPara);

//Clone the previous paragraph

newPara = new Paragraph(newPara);

newPara.setText("Example sub paragraph 2");

tf.getParagraphs().add(newPara);

pres.write(new FileOutputStream("c:\\outNumberedBullets.ppt"));

}