Skip to content

Commit

Permalink
PHPOffice#218 : PowerPoint2007 : Support text direction in Alignment …
Browse files Browse the repository at this point in the history
…for Table (Docs)
  • Loading branch information
Progi1984 committed Mar 6, 2017
1 parent b4e3a79 commit c121f2d
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion docs/shapes_table.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,25 @@ For defining margins of cell, you can use the `setMargin*` method of a Alignment
->setMarginTop(80);
Define the text direction of a cell
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For defining the text direction of cell, you can use the `setTextDirection` method of the `getAlignment` method of a Cell object.
The width is in pixels.

.. code-block:: php
$tableShape = $slide->createTableShape($columns);
$row = $tableShape->createRow();
$cellA1 = $row->nextCell();
$cellA1->getAlignment()->setTextDirection(\PhpOffice\PhpPresentation\Style\Alignment::TEXT_DIRECTION_VERTICAL_270);
Define the width of a cell
~~~~~~~~~~~~~~~~~~~~~~~~~~
The width of cells are defined by the width of cell of the first row.
If not defined, all cells widths are calculated from the width of the shape and the number of columns.

For defining the width of cell, you can use the `setWidth` method of a Cell object.
For defining the width of cell, you can use the `setWidth` method of a Cell object.
The width is in pixels.

.. code-block:: php
Expand Down

0 comments on commit c121f2d

Please sign in to comment.