private void CreateColorControl(String name, int y) { const int colorSize = 12; GroupBox colorGroup = new GroupBox(this); colorGroup.SetPosition(10, y); colorGroup.SetText(name); colorGroup.SetSize(160, 35); colorGroup.Name = name + "groupbox"; ColorDisplay disp = new ColorDisplay(colorGroup); disp.Name = name; disp.SetBounds(0, 10, colorSize, colorSize); TextBoxNumeric numeric = new TextBoxNumeric(colorGroup); numeric.Name = name + "Box"; numeric.SetPosition(105, 7); numeric.SetSize(26, 16); numeric.SelectAllOnFocus = true; numeric.TextChanged += NumericTyped; HorizontalSlider slider = new HorizontalSlider(colorGroup); slider.SetPosition(colorSize + 5, 10); slider.SetRange(0, 255); slider.SetSize(80, colorSize); slider.Name = name + "Slider"; slider.ValueChanged += SlidersMoved; }
private void CreateColorControl(String name, int y) { const int colorSize = 12; GroupBox colorGroup = new GroupBox(this); colorGroup.SetPosition(10, y); colorGroup.SetText(name); colorGroup.SetSize(160, 35); colorGroup.Name = name + "groupbox"; ColorDisplay disp = new ColorDisplay(colorGroup); disp.Name = name; disp.SetBounds(0, 10, colorSize, colorSize); TextBoxNumeric numeric = new TextBoxNumeric(colorGroup); numeric.Name = name + "Box"; numeric.SetPosition(105, 7); numeric.SetSize(26, 16); numeric.SelectAllOnFocus = true; numeric.TextChanged += NumericTyped; HorizontalSlider slider = new HorizontalSlider(colorGroup); slider.SetPosition(colorSize + 5, 10); slider.SetRange(0, 255); slider.SetSize(80, colorSize); slider.Name = name + "Slider"; slider.ValueChanged += SlidersMoved; }
private void CreateColorControl(ControlBase parent, string name) { GroupBox colorGroup = new GroupBox(parent); colorGroup.Text = name; colorGroup.Name = name + "groupbox"; DockLayout layout = new DockLayout(colorGroup); ColorDisplay disp = new ColorDisplay(layout); disp.Height = Util.Ignore; disp.Dock = Dock.Left; disp.Name = name; TextBoxNumeric numeric = new TextBoxNumeric(layout); numeric.Dock = Dock.Right; numeric.FitToText = "000"; numeric.Name = name + "Box"; numeric.SelectAllOnFocus = true; numeric.TextChanged += NumericTyped; HorizontalSlider slider = new HorizontalSlider(layout); slider.Dock = Dock.Fill; slider.VerticalAlignment = VerticalAlignment.Center; slider.SetRange(0, 255); slider.Name = name + "Slider"; slider.ValueChanged += SlidersMoved; }