public Button(Base parent) : base(parent) { buttonA = new Control.Button(this); buttonA.Text = "Event tester"; buttonA.SetBounds(200, 30, 300, 200); buttonA.Pressed += onButtonAp; buttonA.Clicked += onButtonAc; buttonA.Released += onButtonAr; buttonB = new Control.Button(this); buttonB.Text = "\u0417\u0430\u043C\u0435\u0436\u043D\u0430\u044F \u043C\u043E\u0432\u0430"; buttonB.SetPosition(0, 20); buttonC = new Control.Button(this); buttonC.Text = "Image button"; buttonC.SetImage("test16.png"); Align.PlaceDownLeft(buttonC, buttonB, 10); buttonD = new Control.Button(this); buttonD.SetImage("test16.png"); buttonD.SetSize(20, 20); Align.PlaceDownLeft(buttonD, buttonC, 10); buttonE = new Control.Button(this); buttonE.Text = "Toggle me"; buttonE.IsToggle = true; buttonE.Toggled += onToggle; buttonE.ToggledOn += onToggleOn; buttonE.ToggledOff += onToggleOff; Align.PlaceDownLeft(buttonE, buttonD, 10); buttonF = new Control.Button(this); buttonF.Text = "Disabled :D"; buttonF.IsDisabled = true; Align.PlaceDownLeft(buttonF, buttonE, 10); buttonG = new Control.Button(this); buttonG.Text = "With Tooltip"; buttonG.SetToolTipText("This is tooltip"); Align.PlaceDownLeft(buttonG, buttonF, 10); buttonH = new Control.Button(this); buttonH.Text = "I'm autosized"; buttonH.SizeToContents(); Align.PlaceDownLeft(buttonH, buttonG, 10); }
public Button(ControlBase parent) : base(parent) { buttonA = new Control.Button(this); buttonA.Text = "Event tester"; buttonA.SetBounds(200, 30, 300, 200); buttonA.Pressed += onButtonAp; buttonA.Clicked += onButtonAc; buttonA.Released += onButtonAr; buttonB = new Control.Button(this); buttonB.Text = "\u0417\u0430\u043C\u0435\u0436\u043D\u0430\u044F \u043C\u043E\u0432\u0430"; buttonB.SetPosition(0, 20); buttonC = new Control.Button(this); buttonC.Text = "Image button"; buttonC.SetImage("test16.png"); Align.PlaceDownLeft(buttonC, buttonB, 10); buttonD = new Control.Button(this); buttonD.SetImage("test16.png"); buttonD.SetSize(20, 20); Align.PlaceDownLeft(buttonD, buttonC, 10); buttonE = new Control.Button(this); buttonE.Text = "Toggle me"; buttonE.IsToggle = true; buttonE.Toggled += onToggle; buttonE.ToggledOn += onToggleOn; buttonE.ToggledOff += onToggleOff; Align.PlaceDownLeft(buttonE, buttonD, 10); buttonF = new Control.Button(this); buttonF.Text = "Disabled :D"; buttonF.IsDisabled = true; Align.PlaceDownLeft(buttonF, buttonE, 10); buttonG = new Control.Button(this); buttonG.Text = "With Tooltip"; buttonG.SetToolTipText("This is tooltip"); Align.PlaceDownLeft(buttonG, buttonF, 10); buttonH = new Control.Button(this); buttonH.Text = "I'm autosized"; buttonH.SizeToContents(); Align.PlaceDownLeft(buttonH, buttonG, 10); }
public ScrollControl(ControlBase parent) : base(parent) { { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(10, 10, 100, 100); Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Twice As Big"); pTestButton.SetBounds(0, 0, 200, 200); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(110, 10, 100, 100); Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Same Size"); pTestButton.SetBounds(0, 0, 100, 100); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(210, 10, 100, 100); Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Wide"); pTestButton.SetBounds(0, 0, 200, 50); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(310, 10, 100, 100); Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Tall"); pTestButton.SetBounds(0, 0, 50, 200); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(410, 10, 100, 100); ctrl.EnableScroll(false, true); Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Vertical"); pTestButton.SetBounds(0, 0, 200, 200); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(510, 10, 100, 100); ctrl.EnableScroll(true, false); Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Horizontal"); pTestButton.SetBounds(0, 0, 200, 200); } // Bottom Row { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(10, 110, 100, 100); ctrl.AutoHideBars = true; Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Twice As Big"); pTestButton.SetBounds(0, 0, 200, 200); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(110, 110, 100, 100); ctrl.AutoHideBars = true; Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Same Size"); pTestButton.SetBounds(0, 0, 100, 100); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(210, 110, 100, 100); ctrl.AutoHideBars = true; Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Wide"); pTestButton.SetBounds(0, 0, 200, 50); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(310, 110, 100, 100); ctrl.AutoHideBars = true; Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Tall"); pTestButton.SetBounds(0, 0, 50, 200); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(410, 110, 100, 100); ctrl.AutoHideBars = true; ctrl.EnableScroll(false, true); Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Vertical"); pTestButton.SetBounds(0, 0, 200, 200); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(510, 110, 100, 100); ctrl.AutoHideBars = true; ctrl.EnableScroll(true, false); Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Horinzontal"); pTestButton.SetBounds(0, 0, 200, 200); } }
public ScrollControl(Base parent) : base(parent) { { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(10, 10, 100, 100); Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Twice As Big"); pTestButton.SetBounds(0, 0, 200, 200); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(110, 10, 100, 100); Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Same Size"); pTestButton.SetBounds(0, 0, 100, 100); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(210, 10, 100, 100); Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Wide"); pTestButton.SetBounds(0, 0, 200, 50); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(310, 10, 100, 100); Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Tall"); pTestButton.SetBounds(0, 0, 50, 200); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(410, 10, 100, 100); ctrl.EnableScroll(false, true); Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Vertical"); pTestButton.SetBounds(0, 0, 200, 200); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(510, 10, 100, 100); ctrl.EnableScroll(true, false); Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Horizontal"); pTestButton.SetBounds(0, 0, 200, 200); } // Bottom Row { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(10, 110, 100, 100); ctrl.AutoHideBars = true; Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Twice As Big"); pTestButton.SetBounds(0, 0, 200, 200); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(110, 110, 100, 100); ctrl.AutoHideBars = true; Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Same Size"); pTestButton.SetBounds(0, 0, 100, 100); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(210, 110, 100, 100); ctrl.AutoHideBars = true; Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Wide"); pTestButton.SetBounds(0, 0, 200, 50); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(310, 110, 100, 100); ctrl.AutoHideBars = true; Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Tall"); pTestButton.SetBounds(0, 0, 50, 200); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(410, 110, 100, 100); ctrl.AutoHideBars = true; ctrl.EnableScroll(false, true); Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Vertical"); pTestButton.SetBounds(0, 0, 200, 200); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(510, 110, 100, 100); ctrl.AutoHideBars = true; ctrl.EnableScroll(true, false); Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Horinzontal"); pTestButton.SetBounds(0, 0, 200, 200); } }