Developer's reference PB2XLS for PowerBuilder

Reference > N_XLS_WORKSHEET > of_freeze_panes

of_freeze_panes() method

Divide a worksheet into horizontal or vertical regions known as panes and to also "freeze" these panes so that the splitter bars are not visible

Syntax

worksheet.of_freeze_panes (row, col, top_row, left_col)

Parameters

RowThe unsigned integer whose value is the location of the split
ColThe unsigned integer whose value is the location of the split
Top_rowThe unsigned integer whose value is the top-most visible row in the scrolling region of the panes
Left_rowThe unsigned integer whose value is the left-most visible column in the scrolling region of the panes

Return value

Integer. Returns 1 if it succeeds and -1 if an error occurs.

Description

The parameters Row and Col are used to specify the location of the split. It should be noted that the split is specified at the top or left of a cell and that the method uses zero based indexing. Therefore to freeze the first row of a worksheet it is necessary to specify the split at row 2 (which is 1 as the zero-based index).
You can set one of the row and col parameters as zero if you do not want either a vertical or horizontal split.

Examples

worksheet.of_thaw_panes ( 0, 1, 0, 1)	//First column
worksheet.of_thaw_panes ( 1,  0, 1, 0 )	//First row
worksheet.of_thaw_panes( 1, 1, 1, 1 )	// First row and column