c# - How to programmatically add a Tab to TabControl with a ListView control docked inside it? -


I am using Visual Basic 9 (VS2008)

The user wants to create a click the Add a tab button.

A list control should be docked in the tab.

How is a list-view control docked to control tabs in a tabular programmatic way? / P>

This will be something like this ...

  Private sub buttons 1_Click ( System.EventArgs as ByVal Sender as System.Object, ByVal e) Handle Button 1. Click // Create list list as lstView New ListView () lstView.Dock = DockStyle.Fill lstView.Items.Add ("Item 1") / Added item added for testing / added lstView.Items.Add ("Item 2") // Item // New Tab Page for New Tab Page ("Next Tab") tab Dim tab in the form Control. Add list view to add (lstView) // tab page // Add tab page to existing tab control. I.TabControl1.TabPages.Add (tab) ending sub  

Comments