Vertical alignment in textbox

Hi,

I'm trying to align text to top with following code but it didn't work. Also I want to add Filled Square Bullets at the begining. Could you please help? Thanks!

Dim conclusion As String = objDataReader0("conclusion")

Dim para0 As ParagraphEx = tfconclusion.Paragraphs(0)

Dim para1 As New ParagraphEx()

tfconclusion.Paragraphs.Add(para1)

para1.Text = conclusion

para1.Alignment = TextAlignmentEx.Left

para1.Portions(0).FontHeight = 12

para1.RawFontAlignment = FontAlignmentEx.Top

para1.Portions(0).FillFormat.FillType = FillTypeEx.Solid

para1.Portions(0).FillFormat.SolidFillColor.Color = Color.Black

Hello Jane,

Thanks for your interest in Aspose.Slides.

The vertical text alignment is associated with AnchorText property of the TextFrame. Please visit this documentation link for further information. Please follow this thread link where you will find the example of vertical text alignment.

Thanks.How about my question about adding bullet?

Hi Jane,

Please accept my apology for missing your question. Please visit documentation of Managing Paragraph Bullets.

I've tried to use hasbullet but I got error message: Property 'HasBullet' is 'ReadOnly'.

Please help! I'm using vb.net and pptx.



Hi Jane,

Please use the following code snippet to add the bullets in PPTX paragraph. The HasBullet property only return the status either the bullets are enabled or not.

Dim pres As New PresentationEx()
Dim slide As SlideEx = pres.Slides(0)
Dim iShpId As Integer = slide.Shapes.AddAutoShape(ShapeTypeEx.Rectangle, 200, 200, 500, 200)
Dim aShp As AutoShapeEx = CType(slide.Shapes(iShpId), AutoShapeEx)
Dim txtFrm As TextFrameEx = aShp.TextFrame
’Getting the first paragraph of the text frame
Dim para As ParagraphEx = txtFrm.Paragraphs(0)
para.BulletType = BulletTypeEx.Numbered
para.NumberedBulletStartWith = 1
para.NumberedBulletStyle = NumberedBulletStyleEx.BulletArabicDBPlain
para.Text = "Welcome to Aspose.Slides"
para.BulletHeight = 100

Dim iContentCount As Integer = 5

Dim para_new As ParagraphEx
For i As Integer = 0 To iContentCount - 1
para_new = New ParagraphEx(para)
para_new.Text = “Second Bullet_” & i + 1
txtFrm.Paragraphs.Add(para_new)
Next i

’Writing the presentation as a PPT file
pres.Write(“c:\Numbered.pptx”)