sheets

Type: Integer

Availability: Read or write at any time

The sheets property contains the number of sheets for a Table control. Changing the value of this property adds additional sheets to the table or deletes excess sheets, discarding their contents.

The value of the sheets property cannot be set to zero (0). New sheets added to the table adopt the property defaults value for the current sheet.

The following example shows the use of the sheets property.

vars
    count : Integer;
begin
    count := 1;
    while count <= tblPrices.sheets do
        tblPrices.sheet   := count;
        tblPrices.columns := 3;
        tblPrices.rows    := totalRows;
        tblPrices.row     := 1;
        tblPrices.column  := 1;
        tblPrices.text    := "Product";
        tblPrices.column  := 2;
        tblPrices.text    := "Price";
        tblPrices.column  := 3;
        tblPrices.text    := "Available";
        tblPrices.columnWidth[ 1 ] := tblPrices.width.Integer div 6;
        tblPrices.columnWidth[ 2 ] := tblPrices.width.Integer div 3;
        tblPrices.columnWidth[ 3 ] := tblPrices.width.Integer div 6;
        count := count + 1;
    endwhile;
    // allow space for the vertical scroll bar
    tblPrices.width := tblPrices.width + 18;
end;

See also the sheets method of the Folder control.