poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Babu kumar Thannasi <babuthann...@yahoo.com>
Subject POI HSSFTextbox - Can we align a text inside TextBox to center?
Date Fri, 09 Nov 2007 15:18:55 GMT
Hi , 
             i have some TextBoxes in my Excel which are generated using POI . 
  i trying to align the text inside the Texbox to center .. but i could not find any API to
do it. 
  is the any API which alows me to do it.
   
  i am using POI 3.0.1 Jar.
   
  below is my code:
   
  HSSFPatriarch patriarch = sheet.createDrawingPatriarch();
  HSSFClientAnchor txta1 = new HSSFClientAnchor(0,0,250,255,(short)1,0,(short)1,0); 
  HSSFTextbox segPlaTxt = patriarch.createTextbox(txta1);
  segPlaTxt.setLineStyle(HSSFSimpleShape.LINESTYLE_SOLID);
  segPlaTxt.setLineWidth(HSSFSimpleShape.LINEWIDTH_ONE_PT);
  HSSFRichTextString segPlatTxt = new HSSFRichTextString("Text to be align Center");
  segPlatTxt.applyFont(font10);
  segPlaTxt.setString(segPlatTxt);
   
  thanks
  Babu
   

 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message