public static JwButton MakeButton( String text, EventHandler ev ) { JwButton c = new JwButton(); c.SetPreferredSize( new Size(VmUiUtility.ScaleToResolution(50), BUTTON_HEIGHT)); c.Text = text; c.Click += ev; return c; }
//# __________ PROTOCOL :: CONTSTRUCTOR __________ #// public JwTwinButton(JwButton leftButton, JwButton rightButton, int gap, int height) { leftButton.Height = height; rightButton.Height = height; leftButton.SetPreferredSize( new Size(0, height)); rightButton.SetPreferredSize( new Size(0, height)); LeftButton = leftButton; RightButton = rightButton; JwHorizontalLayout p = new JwHorizontalLayout(); p.Gap = gap; p.ControlWidth.BeFill(); p.Add(LeftButton); p.Add(RightButton); SetMargin( new JwMargin(0, 0, 0, 4)); Add(p); }