Skip to content

ControlState

enum cAlgo.API

DesktopCLICloud

Represents the chart control state.

Definition

public enum ControlState

Namespace: cAlgo.API · Group: Styles

Examples

var style = new Style();
style.Set(ControlProperty.BackgroundColor, Color.DarkGreen, ControlState.DarkTheme);
style.Set(ControlProperty.BackgroundColor, Color.LightGreen, ControlState.LightTheme);
style.Set(ControlProperty.BackgroundColor, Color.Green, ControlState.DarkTheme | ControlState.Hover);
style.Set(ControlProperty.BackgroundColor, Color.LimeGreen, ControlState.LightTheme | ControlState.Hover);
Chart.AddControl(new Button { Text = "Buy", Style = style });
style = Style()
style.Set(ControlProperty.BackgroundColor, Color.DarkGreen, ControlState.DarkTheme)
style.Set(ControlProperty.BackgroundColor, Color.LightGreen, ControlState.LightTheme)
style.Set(ControlProperty.BackgroundColor, Color.Green, ControlState.DarkTheme | ControlState.Hover)
style.Set(ControlProperty.BackgroundColor, Color.LimeGreen, ControlState.LightTheme | ControlState.Hover)
button = Button()
button.Text = "Buy"
button.Style = style
api.Chart.AddControl(button)

Values

Name Value Description
Hover 1 The hover.
Pressed 2 The pressed.
Disabled 4 The disabled.
Checked 8 The checked.
DarkTheme 16 The dark theme.
LightTheme 32 The light theme.