Column::SetUpperBound

Description

Set the ending row display indices for this column. Index values are 0 based offsets so use SetUpperBound(-1) to display no rows.

Syntax

BOOL SetUpperBound( int iR2 )

Parameters

iR2
[input] Ending row index (0 based)

Return

Returns TRUE on success and FALSE on failure.

Examples

EX1

// Create a worksheet with data, then hide some of the data
void    Column_SetUpperBound_Ex1()
{
    Worksheet wks;
    wks.Create("Origin",CREATE_VISIBLE);
    DataRange dr;
    vector v1;
    v1.Data(1,100); // Fill column 1 with data
    dr.Add("X", wks, 0, 0, -1, 0);
    dr.Add("Y", wks, 0, 1, -1, 1);
    vector v2;
    v2.Normal(100);
    dr.SetData(&v2, &v1);    
    Column colObj(wks, 0);
    int nR2 = 25;
    colObj.SetUpperBound(nR2); // Limit display to 26 rows
    colObj.Attach(wks, 1); // Re-use Column object for second column
    colObj.SetUpperBound(nR2); // Limit display to 26 rows
}

Remark

SetUpperBound is synonym for SetUpperIndex similarily for GetUpperIndex and GetUpperBound

See Also

Column::SetLowerBound, Column::GetUpperBound, Column::GetLowerBound

header to Include

origin.h