public RadioButton(ControlBase parent) : base(parent) { Control.RadioButtonGroup rbg = new Control.RadioButtonGroup(this, "Sample radio group"); rbg.SetPosition(10, 10); rbg.AddOption("Option 1"); rbg.AddOption("Option 2"); rbg.AddOption("Option 3"); rbg.AddOption("\u0627\u0644\u0622\u0646 \u0644\u062D\u0636\u0648\u0631"); //rbg.SizeToContents(); // it's auto rbg.SelectionChanged += OnChange; Control.LabeledRadioButton rb1 = new LabeledRadioButton(this); rb1.Text = "Option 1"; rb1.SetPosition(300, 10); Control.LabeledRadioButton rb2 = new LabeledRadioButton(this); rb2.Text = "Option 2222222222222222222222222222222222"; rb2.SetPosition(300, 30); Control.LabeledRadioButton rb3 = new LabeledRadioButton(this); rb3.Text = "\u0627\u0644\u0622\u0646 \u0644\u062D\u0636\u0648\u0631"; rb3.SetPosition(300, 50); //this.DrawDebugOutlines = true; }
public RadioButton(ControlBase parent) : base(parent) { VerticalLayout layout = new VerticalLayout(this); Control.GroupBox group = new Control.GroupBox(layout); group.Margin = Margin.Five; group.Text = "Sample radio group"; { Control.RadioButtonGroup rbg = new Control.RadioButtonGroup(group); rbg.AddOption("Option 1"); rbg.AddOption("Option 2"); rbg.AddOption("Option 3"); rbg.AddOption("\u0627\u0644\u0622\u0646 \u0644\u062D\u0636\u0648\u0631"); rbg.SelectionChanged += OnChange; } { EnumRadioButtonGroup <Choices> erbg = new EnumRadioButtonGroup <Choices>(layout); erbg.Margin = Margin.Five; erbg.SelectedValue = Choices.HallC; } }
public RadioButton(Base parent) : base(parent) { Control.RadioButtonGroup rbg = new Control.RadioButtonGroup(this, "Sample radio group"); rbg.SetPosition(10, 10); rbg.AddOption("Option 1"); rbg.AddOption("Option 2"); rbg.AddOption("Option 3"); rbg.AddOption("\u0627\u0644\u0622\u0646 \u0644\u062D\u0636\u0648\u0631"); //rbg.SizeToContents(); // it's auto rbg.SelectionChanged += OnChange; Control.LabeledRadioButton rb1 = new LabeledRadioButton(this); rb1.Text = "Option 1"; rb1.SetPosition(300, 10); Control.LabeledRadioButton rb2 = new LabeledRadioButton(this); rb2.Text = "Option 2222222222222222222222222222222222"; rb2.SetPosition(300, 30); Control.LabeledRadioButton rb3 = new LabeledRadioButton(this); rb3.Text = "\u0627\u0644\u0622\u0646 \u0644\u062D\u0636\u0648\u0631"; rb3.SetPosition(300, 50); //this.DrawDebugOutlines = true; }
public TabControl(ControlBase parent) : base(parent) { { m_DockControl = new Control.TabControl(this); m_DockControl.Margin = Margin.Zero; m_DockControl.Width = 200; //m_DockControl.Height = 150; m_DockControl.Dock = Dock.Top; { Control.Internal.TabButton button = m_DockControl.AddPage("Controls"); ControlBase page = button.Page; { Control.GroupBox group = new Control.GroupBox(page); group.Text = "Tab position"; Control.RadioButtonGroup radio = new Control.RadioButtonGroup(group); radio.AddOption("Top").Select(); radio.AddOption("Bottom"); radio.AddOption("Left"); radio.AddOption("Right"); radio.SelectionChanged += OnDockChange; } } m_DockControl.AddPage("Red"); m_DockControl.AddPage("Green"); m_DockControl.AddPage("Blue"); m_DockControl.AddPage("Blue"); m_DockControl.AddPage("Blue"); } { Control.TabControl dragMe = new Control.TabControl(this); dragMe.Margin = Margin.Five; dragMe.Width = 200; dragMe.Dock = Dock.Top; dragMe.AddPage("You"); dragMe.AddPage("Can"); dragMe.AddPage("Reorder").SetImage("test16.png"); dragMe.AddPage("These"); dragMe.AddPage("Tabs"); dragMe.AllowReorder = true; } }
public TabControl(Base parent) : base(parent) { { m_DockControl = new Control.TabControl(this); m_DockControl.SetBounds(10, 10, 200, 200); { Control.TabButton button = m_DockControl.AddPage("Controls"); Base page = button.Page; { Control.RadioButtonGroup radio = new Control.RadioButtonGroup(page) { Text = "Tab position" }; radio.SetPosition(10, 10); radio.AddOption("Top").Select(); radio.AddOption("Bottom"); radio.AddOption("Left"); radio.AddOption("Right"); radio.SelectionChanged += OnDockChange; } } m_DockControl.AddPage("Red"); m_DockControl.AddPage("Green"); m_DockControl.AddPage("Blue"); } { Control.TabControl dragMe = new Control.TabControl(this); dragMe.SetBounds(220, 10, 200, 200); dragMe.AddPage("You"); dragMe.AddPage("Can"); dragMe.AddPage("Reorder").SetImage("test16.png"); dragMe.AddPage("These"); dragMe.AddPage("Tabs"); dragMe.AllowReorder = true; } }
public TabControl(Base parent) : base(parent) { { m_DockControl = new Control.TabControl(this); m_DockControl.SetBounds(10, 10, 200, 200); { Control.TabButton button = m_DockControl.AddPage("Controls"); Base page = button.Page; { Control.RadioButtonGroup radio = new Control.RadioButtonGroup(page); radio.Text = "Tab position"; radio.SetPosition(10, 10); radio.AddOption("Top").Select(); radio.AddOption("Bottom"); radio.AddOption("Left"); radio.AddOption("Right"); radio.SelectionChanged += OnDockChange; } } m_DockControl.AddPage("Red"); m_DockControl.AddPage("Green"); m_DockControl.AddPage("Blue"); } { Control.TabControl dragMe = new Control.TabControl(this); dragMe.SetBounds(220, 10, 200, 200); dragMe.AddPage("You"); dragMe.AddPage("Can"); dragMe.AddPage("Reorder").SetImage("test16.png"); dragMe.AddPage("These"); dragMe.AddPage("Tabs"); dragMe.AllowReorder = true; } }