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

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

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

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

  //BUT

  Panel 4.show();
}

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?

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.