Module cCJGridFreezeColumnMenuItem.pkg

     1Use cCJCommandBarSystem.pkg
     2
     3Class cCJGridFreezeColumnMenuItem is a cCJMenuItem
     4    
     5    Procedure Construct_Object
     6        Forward Send Construct_Object
     7        Set psCaption to C_$FreezeUnFreeze
     8    End_Procedure
     9    
    10    Procedure OnExecute Variant vCommandBarControl
    11        Handle hoFocus hoCol
    12        Get Focus to hoFocus
    13        Get phoContextMenuColumn of hoFocus to hoCol
    14        Send FreezeColumn of hoFocus hoCol
    15    End_Procedure
    16    
    17    Function IsVisible Returns Boolean
    18        Handle hoFocus
    19        Boolean bAuto
    20        Handle hoCol
    21        Get Focus to hoFocus
    22        Get phoContextMenuColumn of hoFocus to hoCol
    23        Get pbAutoColumnSizing of hoFocus to bAuto
    24        Function_Return (hoCol<>0 and not(bAuto))
    25    End_Function
    26
    27    Function IsEnabled Returns Boolean
    28        Handle hoFocus
    29        Boolean bAuto
    30        Handle hoCol
    31        Get Focus to hoFocus
    32        Get phoContextMenuColumn of hoFocus to hoCol
    33        Function_Return (hoCol)
    34    End_Function
    35
    36End_Class
    37
    38