Click here to Skip to main content
15,887,485 members
Home / Discussions / C#
   

C#

 
GeneralRe: Resize of Custom Control And Excluding control Pin
Eddy Vluggen13-Feb-10 1:10
professionalEddy Vluggen13-Feb-10 1:10 
Newsi have a problem of using an ICMP class at SharpPcap-2.1.1 Pin
3bood.ghzawi29-Dec-09 2:29
3bood.ghzawi29-Dec-09 2:29 
GeneralRe: i have a problem of using an ICMP class at SharpPcap-2.1.1 Pin
Calla29-Dec-09 3:33
Calla29-Dec-09 3:33 
GeneralRe: i have a problem of using an ICMP class at SharpPcap-2.1.1 Pin
dan!sh 29-Dec-09 3:45
professional dan!sh 29-Dec-09 3:45 
JokeRe: i have a problem of using an ICMP class at SharpPcap-2.1.1 Pin
Abhinav S29-Dec-09 3:48
Abhinav S29-Dec-09 3:48 
GeneralRe: i have a problem of using an ICMP class at SharpPcap-2.1.1 Pin
Keith Barrow29-Dec-09 4:00
professionalKeith Barrow29-Dec-09 4:00 
QuestionTabControl Pin
farokhian29-Dec-09 0:25
farokhian29-Dec-09 0:25 
AnswerRe: TabControl Pin
#realJSOP29-Dec-09 0:39
mve#realJSOP29-Dec-09 0:39 
I found this:

You can dynamically remove and inseret TabPages into the TabControl.TabPages collection to hide and show tabs at runtime.

TabPage tabPageSave = null;
private void button1_Click(object sender, EventArgs e)
{
    //hide a tab by removing it from the TabPages collection
    this.tabPageSave = tabControl1.SelectedTab;
    this.tabControl1.TabPages.Remove(this.tabPageSave);
}

private void button2_Click(object sender, EventArgs e)
{
    //show a tab by adding it to the TabPages collection
    if (this.tabPageSave != null)
    {
        int loc = tabControl1.SelectedIndex;
        this.tabControl1.TabPages.Insert(loc, this.tabPageSave);
    }
}


using this google search phrase:

c# winforms tabcontrol hide tabs

Personally, I create TabItems manually instead of adding them in the designer, and then instantiate them in a List so I can manipulate them more logically, but it's essentially the same as what's happening in the code above.

.45 ACP - because shooting twice is just silly
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

QuestionIndex remains on 0(zero) in richtextbox Pin
Dot-Net-Dev29-Dec-09 0:12
Dot-Net-Dev29-Dec-09 0:12 
AnswerRe: Index remains on 0(zero) in richtextbox Pin
Dave Kreskowiak29-Dec-09 3:53
mveDave Kreskowiak29-Dec-09 3:53 
GeneralRe: Index remains on 0(zero) in richtextbox Pin
ProtoBytes29-Dec-09 8:34
ProtoBytes29-Dec-09 8:34 
GeneralRe: Index remains on 0(zero) in richtextbox Pin
Dot-Net-Dev29-Dec-09 16:52
Dot-Net-Dev29-Dec-09 16:52 
GeneralRe: Index remains on 0(zero) in richtextbox Pin
Dave Kreskowiak29-Dec-09 18:08
mveDave Kreskowiak29-Dec-09 18:08 
QuestionWeird Debugging Problem Pin
#realJSOP29-Dec-09 0:10
mve#realJSOP29-Dec-09 0:10 
AnswerRe: Weird Debugging Problem Pin
Keith Barrow29-Dec-09 2:02
professionalKeith Barrow29-Dec-09 2:02 
AnswerRe: Weird Debugging Problem Pin
Ben Fair29-Dec-09 2:35
Ben Fair29-Dec-09 2:35 
GeneralRe: Weird Debugging Problem Pin
Luc Pattyn29-Dec-09 2:45
sitebuilderLuc Pattyn29-Dec-09 2:45 
GeneralRe: Weird Debugging Problem Pin
Ben Fair29-Dec-09 3:07
Ben Fair29-Dec-09 3:07 
GeneralRe: Weird Debugging Problem Pin
#realJSOP29-Dec-09 2:50
mve#realJSOP29-Dec-09 2:50 
GeneralRe: Weird Debugging Problem Pin
Ben Fair29-Dec-09 3:11
Ben Fair29-Dec-09 3:11 
GeneralRe: Weird Debugging Problem Pin
#realJSOP29-Dec-09 3:59
mve#realJSOP29-Dec-09 3:59 
GeneralRe: Weird Debugging Problem [modified] Pin
Keith Barrow29-Dec-09 3:38
professionalKeith Barrow29-Dec-09 3:38 
GeneralRe: Weird Debugging Problem Pin
#realJSOP29-Dec-09 4:02
mve#realJSOP29-Dec-09 4:02 
GeneralRe: Weird Debugging Problem Pin
Keith Barrow29-Dec-09 4:40
professionalKeith Barrow29-Dec-09 4:40 
AnswerRe: Weird Debugging Problem Pin
Saksida Bojan29-Dec-09 3:07
Saksida Bojan29-Dec-09 3:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.