Is it possible to reorder the tabs in the WinForms TabControl
at run-time like IE or Firefox?
Links like this don't give me much hope.
Tab order can be set in the Properties window of the designer using the TabIndex property. The TabIndex property of a control determines where it's positioned in the tab order. By default, the first control added to the designer has a TabIndex value of 0, the second has a TabIndex of 1, and so on.
Adding a TabControl to Form I create a Windows Form application using Visual Studio . NET and add a TabControl from Toolbox to the Form by dragging the TabControl to the Form. After that I resize and reposition TabControl according to the Form size. The Form Designer adds the code for TabControl for you.
Sure, it's possible! You're most likely trying to overcomplicate the solution. Essentially, all you have to do is subclass the standard TabControl
and add some logic to the mouse event handlers. You'll just need to check which form the user is currently dragging and reorder it in the TabPages
collection.
There are a couple of complete solutions available online:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With