Hello - I am using Visual Studio .net 2008. I have a form that has a tabpage control in it with 5 pages. I need to add another page, but in position 2, not at the end. Is this possible? I do not see any settings for the position of the page. Looks like I can only add one at the end.

Any help is much appreciated! Thanks!

Recommended Answers

All 2 Replies

Member Avatar for Unhnd_Exception

Insert it where ever you want.

Dim NewTabPage As New TabPage
TabControl1.TabPages.Insert(0, NewTabPage)

I tried, and your method works also. I did find though, that in the TabControl Properties (not the tabpage properties) that you can set the order of the pages.

Thanks though!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.