Skip to content

FreezeColumn - cCJGrid

Freezes horizontal scrolling for this column and all columns to its left

Type: Procedure

Parameters

Parameter Type Description
hoCol Handle Column object to freeze. This and all columns to its left will be frozen. If 0, no columns are frozen.

Syntax

Procedure FreezeColumn Handle hoCol

Call Example

Send FreezeColumn hoCol

Description

Freeze columns are columns to the left of the grid that will not scroll horizontally when the width of the columns exceeds the width of the grid. The freeze columns divider is drawn between the freeze columns and the remaining columns once the remaining columns are horizontally scrolled. Sending FreezeColumns sets the leftmost freeze column to the passed column object. If zero is passed as the column object, no column is frozen.

FreezeColumn implements this by setting the piFreezeColumnsCount property.

If the grid's pbAutoColumnSizing property is set to True, then the columns will always fit inside the width of the grid and thus, there will be no freeze column divider.

FreezeColumn provides an easy way to dynamically set the freeze columns. This is called by the "Freeze/Unfreeze Column" header context menu, which is only visible if pbAutoColumnSizing if False.

On_Key Key_Ctrl+Key_F Send FreezeSelectedColumn
:
Procedure FreezeSelectedColumn
    Handle hoSel

    Get SelectedColumnObject to hoSel
    If (hoCol) Begin
        Send FreezeColumn hoSel
    End
End_Procedure

See Also

peFreezeColsDividerStyle | piFreezeColsDividerColor