0

Hi,

i want to disable the tabs in the tabcontrol except the selected tab in the C# windows application..Can u please help me ..I dont find any properties to disable the tab pages

3
Contributors
5
Replies
6
Views
9 Years
Discussion Span
Last Post by laxviji143
0

There isnt an enable/disable function for tab pages. Only practical way is to use the onchange event and put back the focus where it came from

0

Yeah sorry man, use delphi... it works .... but not in visual studio but i did that with panels

you can use panels to act as tabs

The oviously on button_click event you just hide all of them and show the one you want to show

EG :

private void button1_Click(object sender, EventArgs e)

Panel1.hide();
panel2.hide();
panel3.hide();

//BUT

Panel 4.show();

just note, you will have to coomplete a layer of work (or do them panel by panel) because panels can be child to other panels , so once you move a panel it gets stuck in another panel

have fun

0
private void button1_Click(object sender, EventArgs e)
{
  Panel1.hide();
  panel2.hide();
  panel3.hide();

  //BUT

  Panel 4.show();
}
0

Yep you can hide or remove them in VS but not disable them - kinda annoying really..

Delphi of course works a treat..
btw you guys doing the Embarcadero webinars this week and next?

0

Thank you very much.....
I made the tab focused on the change event.....

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.