/// <summary> /// Registers the <see cref="ErrorLabel"/> with the <see cref="ModelBoundForm"/> so that it may be displayed. /// </summary> /// <param name="errorLabel"></param> protected void Register(ErrorLabel errorLabel) { _errorLabels.Add(errorLabel.Control.Name, errorLabel); Controls.Add(errorLabel); //todo: I don't care for this much. Add support for other types of input errorLabel.Control.Validating += (sender, args) => ValidateControl(errorLabel.Control, "Text"); }
public static new ErrorLabel For(Forms.Control control, Alignment alignment, int padding) { var errorLabel = new ErrorLabel(control) { ForeColor = Color.Red, AutoSize = true, Visible = true }; SetAlignment(errorLabel, control, alignment, padding); errorLabel.BringToFront(); return(errorLabel); }
public static new ErrorLabel For(Forms.Control control, Alignment alignment, int padding) { var errorLabel = new ErrorLabel(control) { ForeColor = Color.Red, AutoSize = true, Visible = true }; SetAlignment(errorLabel, control, alignment, padding); errorLabel.BringToFront(); return errorLabel; }
public static new ErrorLabel For(Forms.Control control, Alignment alignment) { return(ErrorLabel.For(control, alignment, DefaultPadding)); }
public static new ErrorLabel For(Forms.Control control) { return(ErrorLabel.For(control, Alignment.Right)); }