Could you please explain what 'Controls' is used for?

C

Charlie Brown

I tried to use the help on 'controls' to find out what it is used for but
there is so many different uses for the word as to make the help useless.

So I tried the following.

It appears the second statement adds a new tabpage at the right of the
existing pages.

The third statement inserts the page in front of the existing selected page.

The picturebox is does not show anywhere.

Could you please explain what 'Controls' is used for?

Thanks

TabPageNew.Controls.Add(PictureBoxNew)

TabControlMain.Controls.Add(TabPageNew)

TabControlMain.TabPages.Insert(TabControlMain.SelectedIndex, TabPageNew)

Public ReadOnly Property Controls() As
System.Windows.Forms.Control.ControlCollection
Member of: System.Windows.Forms.Control
Summary:
Gets the collection of controls contained within the control.

Return Values:
A System.Windows.Forms.Control.ControlCollection representing the
collection of controls contained within the control.

The TabPage class inherits this form the System.Windows.Forms.Control
Class. To view the object browser use F2 in visual studio and search
for System.Windows.Forms.TabPage
 
A

active

I tried to use the help on 'controls' to find out what it is used for but
there is so many different uses for the word as to make the help useless.

So I tried the following.

It appears the second statement adds a new tabpage at the right of the
existing pages.

The third statement inserts the page in front of the existing selected page.

The picturebox is does not show anywhere.

Could you please explain what 'Controls' is used for?



Thanks





TabPageNew.Controls.Add(PictureBoxNew)

TabControlMain.Controls.Add(TabPageNew)

TabControlMain.TabPages.Insert(TabControlMain.SelectedIndex, TabPageNew)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top