Bullets.

G

Guest

I actually want to programmatically insert rectangles behind bulleted text.

Details: Suppose I have a slide which has got 4 bullet points with variable
sentence lengths. Now i want to programmatically insert rectangles behind
these bulleted text. Since there are 4 bulleted text, I want to insert 4
rectangles which exactly bound their respective bullet points. Now I have
been able to insert rectanlges. My main problem is to calculate the
dimensions of these rectangles. Since each bullet sentence is of variable
length (1 line, 3 line, 4 lines, 2 lines) I will require rectangles of
variable height and width too. Now, if I try to calculate the bounding box
then I will just get one bounding box...since all these 4 bullets are
considered as a single text object and, hence, there is only one bounding
box. But I want 4 rectangles. One approach that I was thinking of is that we
can calculate the number of letters, the font, the size & font kerning to
know the length of our bullet. But then also, how will I calculate the size
of my rectangles.

Can Anyone help me in this??

Thanks.
 
S

Steve Rindsberg

Technoknight said:
I actually want to programmatically insert rectangles behind bulleted text.

Details: Suppose I have a slide which has got 4 bullet points with variable
sentence lengths. Now i want to programmatically insert rectangles behind
these bulleted text. Since there are 4 bulleted text, I want to insert 4
rectangles which exactly bound their respective bullet points. Now I have
been able to insert rectanlges. My main problem is to calculate the
dimensions of these rectangles. Since each bullet sentence is of variable
length (1 line, 3 line, 4 lines, 2 lines) I will require rectangles of
variable height and width too. Now, if I try to calculate the bounding box
then I will just get one bounding box...since all these 4 bullets are
considered as a single text object and, hence, there is only one bounding
box. But I want 4 rectangles. One approach that I was thinking of is that we
can calculate the number of letters, the font, the size & font kerning to
know the length of our bullet. But then also, how will I calculate the size
of my rectangles.

Can Anyone help me in this??

Each Paragraph is a bullet
Each Paragraph has a Sentences collection
Each Sentence has .BoundLeft, .BoundTop etc. properties
You can use those to define your rectangles

Of course, if you have something like this:

A short sentence. Followed by a longer sentence
that breaks to a new line.

The bounding box for the second sentence will cover up the bounding box for the
first sentence.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top