Skip to content

CreateFieldChooserPanel - cCJGrid

Creates and returns a field chooser panel object to be used with this grid. Is called when the object is created.

Type: Function
Return Data Type: Handle

Syntax

Function CreateFieldChooserPanel Returns Handle

Call Example

Get CreateFieldChooserPanel to HandleVariable

Description

CreateFieldChooserPanel is called by the grid's constructor to create a field chooser panel object and returns its handle. The constructor then assigns this to phoFieldChooserPanel. This provides a way for a grid object or subclass to use a custom field chooser panel object.

The phoFieldChooserPanel contains the object handle of the field chooser object. This is a panel that contains the field chooser COM control, which maintains a list of all hidden columns. This controlled is used to drag columns back onto a grid. Normally this is invoked via the context header menu although the ActivateFieldChooser method can be used to manually invoke this field chooser panel..

The cCJGrid class uses a cCJGridFieldChooserPanel object, which is created as follows:

Function CreateFieldChooserPanel Returns Handle
    Handle hoFieldChooserPanel
    Get Create (RefClass(cCJGridFieldChooserPanel)) to hoFieldChooserPanel
    Set phoGridObject of hoFieldChooserPanel to Self
    Function_Return hoFieldChooserPanel
End_Function

If you create your own field chooser panel, which will probably be based on a subclass of cCJGridFieldChooserPanel, you would augment this method providing your own custom class name.

This message can only be augmented in subclasses. If added to an object, it will not be called when the object is created.

Return Value

Returns handle of a field chooser panel object to be used with this grid.