Hello

    It is possible to change default indentation on TableCell when contents
take more than one line in the shape?

Sample code : 

        SlideShow ppt = new SlideShow();        
        Slide slide = ppt.createSlide();

        Table table = new Table(4,4);
        int width = 50;
        int height = 15;
        TableCell cell = null;
        for( int i = 0 ; i < table.getNumberOfRows() ; i++)
        {
                table.setRowHeight(i, height);
                for( int j = 0 ; j < table.getNumberOfColumns() ; j++)
                {
                        table.setColumnWidth(j, width);
                        cell = table.getCell(i, j);
                        
                        Rectangle rect = cell.getAnchor();
                        rect.setFrame(table.getAnchor().getX() + rect.getX() , 
                                            table.getAnchor().getY() +
rect.getY() , width , height);
                        cell.setAnchor(rect);
                        
                        RichTextRun r = cell.getTextRun().getRichTextRuns()[0];
                        r.setText("helloworld");
                        r.setFontName("Arial");
                        r.setFontSize(10);
                        r.setIndentLevel(0);
                }
        }               
        slide.addShape(table);

Regards
Mathieu Grosmaire
-- 
View this message in context: 
http://www.nabble.com/HSLF-%3A-help%2C-change-indentation-on-TableCell-tp18689162p18689162.html
Sent from the POI - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to