Exemple #1
0
        /// <summary>
        /// Gets or Sets the text that will be presented as the watermak hint
        /// </summary>
        public TextBoxCustom()
            : base()
        {
            this._watermarkActive = true;
            this.Text             = _watermarkText;
            this.ForeColor        = Color.Gray;

            GotFocus += (source, e) =>
            {
                RemoveWatermak();
            };

            LostFocus += (source, e) =>
            {
                ApplyWatermark();
            };
            _lost = new lostFocus(ApplyWatermark);
        }
        public TextBoxCustom()
            : base()
        {
            this._watermarkActive = true;
            this.Text = _watermarkText;
            this.ForeColor = Color.Gray;

            GotFocus += (source, e) =>
            {
                RemoveWatermak();
            };

            LostFocus += (source, e) =>
            {
                ApplyWatermark();
            };
            _lost = new lostFocus(ApplyWatermark);
        }