Change TabControl ItemSize dynamically?
-
Hi, I'm working with a application and I've added support for scaling window so it can fit different resolution. One control I'm having problem with is the TabControl. I've used the fixed style and set the ItemSize (had to do that to get the correct look with horizontal text). But now the control refuses to change it's ItemSize when I'm scaling the window. Anyone know of a way to change the ItemSize property dynamically on a tabcontrol? Regards /Mike
-
Hi, I'm working with a application and I've added support for scaling window so it can fit different resolution. One control I'm having problem with is the TabControl. I've used the fixed style and set the ItemSize (had to do that to get the correct look with horizontal text). But now the control refuses to change it's ItemSize when I'm scaling the window. Anyone know of a way to change the ItemSize property dynamically on a tabcontrol? Regards /Mike
this.tabControl1.ItemSize = new Size(Convert.ToInt32(this.Width * 0.1), Convert.ToInt32(this.Height * 0.1)); (Just a random number to have this, The tabcontrol is in Fixed Size mode) and have used the above code in Resize event.