I want to move between tab on tab control using Navigation Buttons , and i don't want the user try to move between tabs using mouse , How can i do that ??
-
1You can do that by using code ... – jAC Apr 24 '13 at 06:20
-
Janes please can you tell how ? – Hisham Apr 24 '13 at 06:22
-
No, look at your question. There's no effort. Try to show what you tried already and I help you. Btw.: This should work without using code. Tried it and worked. – jAC Apr 24 '13 at 06:23
1 Answers
This doesn't really make a lot of sense.
Short of disabling the mouse cursor entirely, I don't know how you would possibly achieve this. Even if there were a way of "ignoring" mouse clicks on the tab control tabs, that would be incredibly bad UI. As far as the user would be concerned, your application would be pathetically broken—"I try to do the same thing I do in all other apps, but this one just sits here like it's dead. Stupid buggy program."
So that's a non-starter. If the goal here is to force the user to navigate through the tabs in a particular order (like a wizard), then I recommend just hiding the tabs altogether. Then the user won't be tempted to click on them or switch between them in an arbitrary order. You will have to control tab switching through code, by setting the SelectedTab
or SelectedIndex
property. This will also give you a place to run any additional code that you want when switching tabs.
You'll find instructions on how to hide the tabs on the TabControl in Hans's answer here.

- 1
- 1

- 239,200
- 50
- 490
- 574