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(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(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; } }