How to display the same control on two different tabs?

I am using VB.NET

I need one control (ListBox) to appear on two different tabs.

Is it mandatory to create 2 different instances of ListBox?

+5
source share
5 answers

If you do not need development-time support, you can simply change the parent instance of the ListBox at runtime from one tab to another (make sure you have positioning configured correctly).

Essentially this:

listBox1.Parent = tabControl1.TabPages[1];

In the end, it will probably be easier for you to just have two ListBox with the same data source.

+12
source

, , ListBox . , DataSource .

+1

, .

+1

, . , .

+1

(initTabs)

$( '# YourTabID') ($ ( '# YourControlId'));.

,

0
source

All Articles