wks_scroll_into_view

 

Description

worksheet scroll function

Syntax

bool wks_scroll_into_view( Worksheet & wks, int nCol, int nOffset = 0, bool bCol = true, bool bCheckInView = true )

Parameters

wks
[input] The worksheet to scroll.
nCol
[input] The index of the column to scroll into view, 0-offset, or row index if bCol = false
nOffset
[input]to allow not scrolling to the left/top, to allow an offset
bCol
[input] to scroll either column or row
bCheckInView
[input] if true will first check if specified nCol is already in view and do nothing

Return

true if scrolled into view, or if already in view and nothing is done when bCheckInView is true.

false if error

Examples

Ex1

void wks_scroll_into_view_Ex1()
{
    //make sure a worksheet is active in current project
    Worksheet wks=Project.ActiveLayer();
        if(wks_scroll_into_view(wks,15,0,false,true))
                out_str("scroll to row 15 ");
}

Remark

See Also

header to Include

origin.h

Reference