GetChecked - cWebCheckbox

Returns whether the checkbox is checked or not according to the psChecked and psUnchecked settings

Type: Function

Return Data Type: Boolean

Parameters: None

Return Value


Syntax
Function GetChecked Returns Boolean

Call: Get GetChecked to BooleanVariable


Description

Returns whether the checkbox is checked or not according to the psChecked and psUnchecked settings.

By using GetChecked and SetChecked, you do not need to know the actual values of psValue, psChecked or psUnchecked.

During web app initialization (while all the Web Objects are being created), this message will get the design-time psValue, at all other times it will WebGet the client's synchronized psValue.


Sample

This sample shows how to get a cWebCheckBox control's value to the value determined by psChecked. In this case, the control's value will be set to "Y".

Object oCurrentCheckbox is a cWebCheckbox
    Set piColumnSpan to 3
    Set psCaption to "Current Items Only"
    Set piColumnIndex to 2
    Set psChecked to "Y"
    Set psUnchecked to "N"
    Set psValue to "Y"
End_Object
:
Procedure MyCustomMethod
    Boolean bCurrent
    Get GetChecked of oCurrentCheckbox to bCurrent
    // now do whatever with that value
    
    // checkbox is checked
    If (bCurrent) Begin
    End
    // checkbox is NOT checked
    Else Begin
    End
End_Procedure