Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

CheckBox AutoSize Ignored?

$
0
0

Hi, I am creating a custom control to establish the “company style” in an easy to use drag and drop interface. For my checkbox buttons (toggle switches), I want to turn AutoSize off so other users can freely resize buttons as needed.  See the enclosed code below:

InitializeComponent();

this.Appearance = System.Windows.Forms.Appearance.Button;

this.FlatStyle = System.Windows.Forms.FlatStyle.Popup;

this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;

this.BackgroundImage = Properties.Resources.UIBrushButtonBackgroundDark_Dark;

this.ForeColor = System.Drawing.Color.White;

this.AutoSize =false;

 

However when I check the control and drag it onto another form the AutoSize property is marked True in bold. Any suggestions?


Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>