public static void BorderInput(VisualTextBox input, BorderColor color) { switch (color) { case BorderColor.Vermelho: input.Border.Color = Color.FromArgb(255, 128, 128); input.Border.HoverColor = Color.FromArgb(255, 128, 128); break; case BorderColor.Azul: input.Border.Color = Color.FromArgb(128, 128, 255); input.Border.HoverColor = Color.FromArgb(128, 128, 255); break; default: input.Border.Color = Color.Gainsboro; input.Border.HoverColor = Color.Gainsboro; break; } }
/// <summary>Initialize the controls.</summary> private void InitializeControls() { label = new VisualLabel { Text = @"Enter your input: ", Size = new Size(90, 25), Location = new Point(BodyContainer.X, BodyContainer.Y) }; textBox = new VisualTextBox { Text = string.Empty, Watermark = { Visible = true, Text = "Enter your input..." }, Location = new Point(label.Right, BodyContainer.Y + 2), Size = new Size(200, 23) }; textBox.TextBoxWidth = textBox.GetTextBoxWidth(); textBox.TextChanged += TextBox_TextChanged; button = new VisualButton { Text = @"OK", Size = ButtonSize, Location = new Point(textBox.Right - ButtonSize.Width, textBox.Bottom + 5), Enabled = false }; button.Click += Button_Click; Controls.Add(label); Controls.Add(textBox); Controls.Add(button); }
public VisualTextBoxActionList(IComponent component) : base(component) { _control = (VisualTextBox)component; _designerService = (DesignerActionUIService)GetService(typeof(DesignerActionUIService)); }