Menu

Vertical Alignment not working

gbarlow
2005-06-24
2013-05-01
  • gbarlow

    gbarlow - 2005-06-24

    I am using the following code the put text into a table cell and to then align the text in the middle of the cell.  The Horizontal Alignment works but the Vertical doesn't.

    Can anyone tell me where i'm going wrong please.

    Dim c As New Cell
    Dim font As com.lowagie.text.Font
    font = FontFactory.getFont(FontFactory.COURIER, cell.FontSize, com.lowagie.text.Font.NORMAL)
    Dim p As New Phrase("test", font)
    c.setVerticalAlignment(Element.ALIGN_MIDDLE)
    c.setHorizontalAlignment(Element.ALIGN_CENTER)
    c.addElement(p)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.