SComboButton¶
Property | Type | Note |
---|---|---|
Aka | String | Name for the widget |
ButtonColorAndOpacity | Number Array, Length = 4 | |
ButtonContent | Object | |
ButtonStyle | Object | For example:"ButtonStyle": |
ContentPadding | Number or Number Array (Length = 2 or 4) | |
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 |
HasDownArrow | Bool | |
OnGetMenuContent | Object | "OnGetMenuContent": {"items": [{"name": "ItemNameA", "Command": "print('A')" },{"name": "ItemNameB", "Command": "print('B')" }]} |
ToolTipText | String | |
VAlign | String | Enum: EVerticalAlignment: Fill, Top, Center, Bottom |
Visibility | Enum: EVisibility: Visible, Collapsed, Hidden, HitTestInvisible, SelfHitTestInvisible, All |
Examples¶
Example 1:
"SComboButton": {
"ButtonContent": {
"STextBlock": {
"Text": "Choose And Trigger the Command"
}
},
"HasDownArrow": true,
"OnGetMenuContent": {
"items": [
{"name": "kaka" , "Command": "print('kaka' )" },
{"name": "Sponge" , "Command": "print('Sponge' )" },
{"name": "Lime" , "Command": "print('Lime' )" },
{"name": "GrandCanyon" , "Command": "print('GrandCanyon')" },
{"name": "RockMine" , "Command": "print('RockMine' )" },
{"name": "Pink" , "Command": "print('Pink' )" },
{"name": "White" , "Command": "print('White' )" }
]
},
"HAlign": "Center"
}