Bootstrap Chameleon Logo

SCheckBox

SCheckBox

Property Type Note
Aka String Name for the widget
CheckBoxStyle String "CheckBoxStyle":
ColorAndOpacity Number Array, Length = 4 Linear color values, for example:[0.5, 0.5, 0.5, 1]
Content Object The only child widget in this widget's content.
ForegroundColor Number Array, Length = 4 Linear color values, for example:[0.5, 0.5, 0.5, 1]
HAlign String Enum: EHorizontalAlignment: Fill, Left, Center, Right
IsChecked Bool
OnCheckStateChanged String The python code which will be executed.
Padding Number or Number Array (Length = 2 or 4)
ToolTipText String
Visibility Enum: EVisibility: Visible, Collapsed, Hidden, HitTestInvisible, SelfHitTestInvisible, All

functions what can be called from ChameleonData

FunctionName Description
set_color_and_opacity Set widget's color and opacity.
get_is_checked Get the Checked state of Specified SCheckBox
set_is_checked Set the Checked state of Specified SCheckBox

Examples

Example 1:

    "SCheckBox":{
        "Content":
        {
            "STextBlock": {
                "Text": "Check Box Label"
            }
        },
        "IsChecked": true,
        "OnCheckStateChanged": "print(%)"
    }

Example 2:

    "SCheckBox":
    {
        "Content": {
            "HAlign": "Center",
            "SBox": {
                "VAlign": "Center",
                "HAlign": "Center",
                "Padding" : [10, 10],
                "Content":
                {
                    "STextBlock":
                    {
                        "Text": "Toggle Button is actually a SCheckBox"
                    }
                }
            }
        },
        "CheckBoxStyle": {
            "Style": "FCoreStyle",
            "StyleName": "ToggleButtonCheckbox"
        },
        "Padding": 6,
        "IsChecked": true,
        "OnCheckStateChanged": "print('checked: %'.format(%))"
    }