thielj / MetroFramework

Metro UI of Windows 8 for .NET Windows Forms applications
http://thielj.github.io/MetroFramework
Other
396 stars 225 forks source link

TabPage sequence changes while saving desing of form. #6

Open dibyamani opened 10 years ago

dibyamani commented 10 years ago

When I save the form's design, the sequence of the tab pages gets changed inside InitializeComponent() method of form designer.

thielj commented 10 years ago

It's a known bug - and I don't have a solution for this. If you can provide a fix it would be more than welcome!

dibyamani commented 10 years ago

Hi Tielj,

I have figured out the root of the problem but I don't know the solution. Probably it will help you to fix this issue. Actually, the OnControlAdded method in the MetroTabControl(line no: 349) is giving this problem. If I comment this method, problem is fixed.

Thank you.

zeeshan47 commented 9 years ago

you can avoid the problem by saving the tab value . go to program class declare a varibale like pulic static int32 tab = 0; on metrotab selectedtab change event write following program.tab = metroTabControl1.SelectedIndex;

Now on form load this.metroTabControl1.SelectedIndex =program.tab;

.//////////////////////////// this will surely solve your problem