Feb 17, 2019

Set AutoSize value to false in TextBox in Windows form C#

using System.ComponentModel;
using System.Windows.Forms;

namespace WorkingHelper.Controls
{
    class WH_TextBox : TextBox
    {
        [DefaultValue(false)]
        [Browsable(true)]
        public override bool AutoSize
        {
            get { return base.AutoSize; }
            set { base.AutoSize = value; }
        }

        public WH_TextBox()
        {
            this.AutoSize = false;
        }
    }
}

No comments:

Post a Comment