Click here to Skip to main content
15,925,444 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Disable or hide a tab page Pin
Mekong River27-Jan-06 4:27
Mekong River27-Jan-06 4:27 
GeneralRe: Disable or hide a tab page Pin
Dave Kreskowiak27-Jan-06 6:00
mveDave Kreskowiak27-Jan-06 6:00 
GeneralRe: Disable or hide a tab page Pin
Mekong River28-Jan-06 2:20
Mekong River28-Jan-06 2:20 
GeneralRe: Disable or hide a tab page Pin
Dave Kreskowiak28-Jan-06 10:16
mveDave Kreskowiak28-Jan-06 10:16 
GeneralRe: Disable or hide a tab page Pin
Mekong River28-Jan-06 12:53
Mekong River28-Jan-06 12:53 
GeneralRe: Disable or hide a tab page Pin
directred27-Jan-06 4:28
directred27-Jan-06 4:28 
GeneralRe: Disable or hide a tab page Pin
directred27-Jan-06 4:42
directred27-Jan-06 4:42 
GeneralRe: Disable or hide a tab page Pin
[Marc]27-Jan-06 5:29
[Marc]27-Jan-06 5:29 
Because you have removed the tab pages from the TabControl1.TabPages collection, they are no longer in that collection. You can't ask for a tab page in a collection from which you just removed it. You have to store the tab pages you removed somewhere else, like an arraylist (or in .net 2.0 a List(Of TabPage)).
private removedPages As New List(Of TabPage)

removedPages.Add(TabControl1.TabPages(4))
removedPages.Add(TabControl1.TabPages(3))
removedPages.Add(TabControl1.TabPages(2))
removedPages.Add(TabControl1.TabPages(1))
removedPages.Add(TabControl1.TabPages(0))

TabControl1.TabPages.Remove(TabControl1.TabPages(4))
TabControl1.TabPages.Remove(TabControl1.TabPages(3))
TabControl1.TabPages.Remove(TabControl1.TabPages(2))
TabControl1.TabPages.Remove(TabControl1.TabPages(1))
TabControl1.TabPages.Remove(TabControl1.TabPages(0))

TabControl1.TabPages.Add(removedPages(0)) <==== Error here
TabControl1.TabPages.Add(removedPages(1))
TabControl1.TabPages.Add(removedPages(3))
TabControl1.TabPages.Add(removedPages(4))

Hope this helps! Smile | :)


"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick

|| Fold With Us! || Pensieve || VG.Net ||

GeneralRe: Disable or hide a tab page Pin
Dave Kreskowiak27-Jan-06 5:55
mveDave Kreskowiak27-Jan-06 5:55 
Questiontransparent label Pin
rzvme27-Jan-06 3:19
rzvme27-Jan-06 3:19 
AnswerRe: transparent label Pin
Dave Kreskowiak27-Jan-06 4:15
mveDave Kreskowiak27-Jan-06 4:15 
AnswerRe: transparent label Pin
JUNEYT27-Jan-06 7:29
JUNEYT27-Jan-06 7:29 
GeneralRe: transparent label Pin
rzvme27-Jan-06 7:46
rzvme27-Jan-06 7:46 
Questiontime values in vb6 Pin
_tasleem27-Jan-06 2:36
_tasleem27-Jan-06 2:36 
AnswerRe: time values in vb6 Pin
Guffa27-Jan-06 2:44
Guffa27-Jan-06 2:44 
AnswerRe: time values in vb6 Pin
Matthew Hazlett27-Jan-06 6:30
Matthew Hazlett27-Jan-06 6:30 
AnswerRe: time values in vb6 Pin
Mekong River28-Jan-06 5:52
Mekong River28-Jan-06 5:52 
AnswerRe: time values in vb6 Pin
Tim Carmichael3-Feb-06 4:28
Tim Carmichael3-Feb-06 4:28 
QuestionMulticolumn comboboxes in VB.Net Pin
trimtrom27-Jan-06 1:41
trimtrom27-Jan-06 1:41 
AnswerRe: Multicolumn comboboxes in VB.Net Pin
Dave Kreskowiak27-Jan-06 4:11
mveDave Kreskowiak27-Jan-06 4:11 
AnswerRe: Multicolumn comboboxes in VB.Net Pin
Mekong River28-Jan-06 5:56
Mekong River28-Jan-06 5:56 
Questionerrors to b removed... Pin
Bhavna Varshney27-Jan-06 0:32
Bhavna Varshney27-Jan-06 0:32 
AnswerRe: errors to b removed... Pin
Steve Pullan27-Jan-06 0:41
Steve Pullan27-Jan-06 0:41 
AnswerRe: errors to b removed... Pin
Dave Kreskowiak27-Jan-06 4:09
mveDave Kreskowiak27-Jan-06 4:09 
GeneralRe: errors to b removed... Pin
Bhavna Varshney27-Jan-06 18:41
Bhavna Varshney27-Jan-06 18:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.