Results 1 to 8 of 8

Thread: How to set the text color of a bold cDbCJGridColumn?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2009
    São Paulo / Brazil

    Default How to set the text color of a bold cDbCJGridColumn?


    After migrate a VDF 17.0 Windows Application to DataFlex 18.1, I got a problem with the text color of a bold cDbCJGridColumn. If the pbSelectionEnabled=True and there is a column with ComBold=True, the text color from the bold column get white. It does not repect the piHighlightForeColor property.

    I'm sending two images:

    17_0.jpg: Grid on VDF 17.0.
    18_1.jpg: the same Grid on VDF 18.1

    So, the question is: how can I set the selected row text color from a bold cDbCJGridColumn?

    Or: How to force the selected row text color from a bold cDbCjGridColumn to respect the piHighlightForeColor propertY?

    Below is my Grid source:

    Object oOrderDtl_Grid is a cDbCJGrid
        Set Server to OrderDtl_DD
        Set Ordering to 1
        Set Size to 63 377
        Set Location to 107 3
        Set peAnchors to anAll
        Set pbAllowInsertRow to False
        Set pbRestoreLayout to False
        Set psLayoutSection to "OrderView_oOrderDtl_Grid2"
        Set piLayoutBuild to 6
        Set pbHeaderPrompts to True
        Set piHighlightBackColor to clAqua
        Set pbSelectionEnable to True
        Set piHighlightForeColor to clBlack
        On_Key Key_F11 Send Request_InsertRow
        Object oMark is a cCJGridColumnRowIndicator
        Object oInvt_Item_ID is a cDbCJGridColumn
            Entry_Item Invt.Item_ID
            Set piWidth to 91
            Set psCaption to "Item ID"
            Set psImage to "ActionPrompt.ico"
        Object oInvt_Description is a cDbCJGridColumn
            Entry_Item Invt.Description
            Set piWidth to 213
            Set psCaption to "Description"
            Procedure OnSetDisplayMetrics Handle hoGridItemMetrics Integer iRow String  ByRef sValue
                Handle hoFont            
                Variant vFont                
                Forward Send OnSetDisplayMetrics hoGridItemMetrics iRow (&sValue)
                Get Create (RefClass(cComStdFont)) to hoFont
                Get ComFont of hoGridItemMetrics to vFont
                Set pvComObject of hoFont to vFont
                Set ComBold of hoFont to True
                Send Destroy of hoFont                
    Ivan Kaupa
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	17_0.jpg 
Views:	195 
Size:	160.4 KB 
ID:	9801   Click image for larger version. 

Name:	18_1.jpg 
Views:	193 
Size:	139.0 KB 
ID:	9802  

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts