21.08.2013 Views

OpenOffice.org BASIC Guide.pdf - OpenOffice.org wiki

OpenOffice.org BASIC Guide.pdf - OpenOffice.org wiki

OpenOffice.org BASIC Guide.pdf - OpenOffice.org wiki

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Rows and Columns 126<br />

FirstRow = Sheet.Rows(0)<br />

The column objects support the<br />

com.sun.star.table.TableColumn<br />

service that has the following properties:<br />

Width (long)<br />

width of a column in hundredths of a millimeter.<br />

OptimalWidth (Boolean)<br />

sets a column to its optimum width.<br />

IsVisible (Boolean)<br />

displays a column.<br />

IsStartOfNewPage (Boolean)<br />

when printing, creates a page break before a column.<br />

The width of a column is only optimized when the OptimalWidth property is set to True. If<br />

the width of an individual cell is changed, the width of the column that contains the cell is<br />

not changed. In terms of functionality, OptimalWidth is more of a method than a property.<br />

The row objects are based on the<br />

com.sun.star.table.RowColumn<br />

service that has the following properties:<br />

Height (long)<br />

height of the row in 100ths of a millimeter.<br />

OptimalHeight (Boolean)<br />

sets the row to its optimum height.<br />

IsVisible (Boolean)<br />

displays the row.<br />

IsStartOfNewPage (Boolean)<br />

when printing, creates a page break before the row.<br />

If the OptimalHeight property of a row is set to the True, the row height changes<br />

automatically when the height of a cell in the row is changed. Automatic optimization<br />

continues until the row is assigned an absolute height through the Height property.<br />

The following example activates the automatic height optimization for the first five rows in<br />

the sheet and makes the second column invisible.<br />

Dim Doc As Object<br />

Dim Sheet As Object<br />

Dim Row As Object<br />

Dim Col As Object<br />

Dim I As Integer

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!