phoReportPaintManager - cCJGrid
Provides a proxy object for the cCJGridPaintManager class, allows modifying display attributes of the grid or list
Type: Property
Access: Read/Write
Data Type: Handle
Parameters: None
Syntax
Property Handle phoReportPaintManager
| Access Type | Syntax |
|---|---|
| Read Access: | Get phoReportPaintManager to HandleVariable |
| Write Access: | Set phoReportPaintManager to HandleVariable/Value |
Description
phoReportPaintManager is a DataFlex proxy object for the cCJGridPaintManager class. It can only be used when the grid class is activated (i.e., the cCJGrid COM object is created) to modify display attibutes of the grid or list. This is statically bound to a column, so you do not need to provide this binding yourself.
This object is provided to provide easier access to the cCJGridPaintManager interface. The most important paint manager interfaces are already exposed as simple properties, so you will only need to use this for unusual requirements.
To changing the font attributes of individual cells, even conditionally, see OnSetDisplayMetrics.
Procedure OnCreateGridControl
Handle hoPaintManager
Forward Send OnCreateGridControl
Get phoReportPaintManager to hoPaintManager
Set ComShowLockIcon of hoPaintManager to True
End_Procedure
Sample
This sample shows how to change the font size of a cCJGrid object. This sample method could be placed inside a cCJGrid or cDbCJGrid object and called from Activating or another method to dynamically change the grid's font size.
Procedure DoChangeFontSize Integer iVal
Handle hoGrid hoFont hoPaintManager
Variant vFont
String sFont sFontSize
Boolean bCreated
Move Self to hoGrid
Get IsComObjectCreated of hoGrid to bCreated // When program is started, grid object isn't created yet
If (bCreated = False) Procedure_Return
Get phoReportPaintManager of hoGrid to hoPaintManager
Get Create (RefClass(cComStdFont)) to hoFont // Create a font object
Get ComTextFont of hoPaintManager to vFont // Bind the font object to the Grid's text font
Set pvComObject of hoFont to vFont // Connect DataFlex object with com object
Set ComSize of hoFont to iVal
Send ComRedraw of hoGrid
Send Destroy to hoFont // Destroy the font object (releases memory)
End_Procedure
Notes
This can only be used when the grid control is active.
The proxy object is statically bound to the COM object, so you do not need to 'set pvComObject' before using it.
You should never set this property.