Have a form with a tab control an ~10 tabs. Each contains its own controls,
but 2 text boxes are common on each tab control. Is there a way to leverage
the *same text box on multiple tabs so I can use the same one and not have
tbNameTab1, tbNameTab2, tbNameTab3, etc. This would allow me to leverage
some logic across tabs. Cheers!

--
William Stacey, MVP

Re: Reusing textbox on multiple tabs in a tab control. by hirf-spam-me-here

hirf-spam-me-here
Fri Jul 16 10:27:16 CDT 2004

* "William Stacey [MVP]" <staceywREMOVE@mvps.org> scripsit:
> Have a form with a tab control an ~10 tabs. Each contains its own controls,
> but 2 text boxes are common on each tab control. Is there a way to leverage
> the *same text box on multiple tabs so I can use the same one and not have
> tbNameTab1, tbNameTab2, tbNameTab3, etc. This would allow me to leverage
> some logic across tabs.

Move them outside a tabpage, then move them to the desired position in
front of the tabcontrol. When dragging the textbox, make sure, not to
move the mouse outside the area of the control you are currently
dragging. Alternatively, move the tabcontrol away, place the textboxes
directly on the form and move the tabcontrol behind the textboxes.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Re: Reusing textbox on multiple tabs in a tab control. by Mick

Mick
Fri Jul 16 10:52:06 CDT 2004

\\\VB
Private Sub TabControl1_SelectedIndexChanged(...)...
Dim CommonTextBox() As Control ={TextBox1,TextBox2}
TabControl1.SelectedTab.Controls.AddRange(CommonTextBox)
End Sub
///
\\\C#
private void tabControl1_SelectedIndexChanged(...)
{
Control[] commonTextBox={textBox1,textBox2};
tabControl1.SelectedTab.Controls.AddRange(commonTextBox);
}
///
--
Mick Doherty
http://dotnetrix.co.uk/nothing.html


"William Stacey [MVP]" <staceywREMOVE@mvps.org> wrote in message
news:eEakKZ0aEHA.2056@TK2MSFTNGP12.phx.gbl...
> Have a form with a tab control an ~10 tabs. Each contains its own
controls,
> but 2 text boxes are common on each tab control. Is there a way to
leverage
> the *same text box on multiple tabs so I can use the same one and not have
> tbNameTab1, tbNameTab2, tbNameTab3, etc. This would allow me to leverage
> some logic across tabs. Cheers!
>
> --
> William Stacey, MVP
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.719 / Virus Database: 475 - Release Date: 12/07/2004



Re: Reusing textbox on multiple tabs in a tab control. by William

William
Fri Jul 16 10:49:45 CDT 2004

Thanks Herfried. That will work fine. Cheers!

--
William Stacey, MVP

"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:upOOml0aEHA.3996@TK2MSFTNGP12.phx.gbl...
> * "William Stacey [MVP]" <staceywREMOVE@mvps.org> scripsit:
> > Have a form with a tab control an ~10 tabs. Each contains its own
controls,
> > but 2 text boxes are common on each tab control. Is there a way to
leverage
> > the *same text box on multiple tabs so I can use the same one and not
have
> > tbNameTab1, tbNameTab2, tbNameTab3, etc. This would allow me to
leverage
> > some logic across tabs.
>
> Move them outside a tabpage, then move them to the desired position in
> front of the tabcontrol. When dragging the textbox, make sure, not to
> move the mouse outside the area of the control you are currently
> dragging. Alternatively, move the tabcontrol away, place the textboxes
> directly on the form and move the tabcontrol behind the textboxes.
>
> --
> Herfried K. Wagner [MVP]
> <URL:http://dotnet.mvps.org/>