![]()  | 
 
TabControl: Programaticly select a tab | 
 
    Post Reply  
   | 
  
| Author | |
   
   fernando  
   
   Groupie  
   Joined: 22 May 2006 Status: Offline Points: 25  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: TabControl: Programaticly select a tabPosted: 12 July 2006 at 6:15am  | 
 
| 
   
    
   Hi, 
   
  I must be missing something, but how can I programmaticly select a tab? After adding several tabs and displaying the form, the tab control appears empty and only displays its content when I click on a given tab. I already rtfmed, but th emost promissing property (Selected) is read only... Thanks in advance  | 
 |
![]()  | 
 |
   
   SuperMario  
   
   Senior Member  
    
   Joined: 14 February 2004 Status: Offline Points: 18057  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 12 July 2006 at 9:09am | 
 
| 
   
    
   Something like this? 
   
  TabControl.Item(3).Selected = True I need to see how you are adding your tabs to determine why they might be empty.  | 
 |
![]()  | 
 |
   
   fernando  
   
   Groupie  
   Joined: 22 May 2006 Status: Offline Points: 25  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 12 July 2006 at 10:57am | 
 
   
   
 This is how I'm adding them: 'Locales is a TabControl With locales .SetImageList imlLocales .InsertItem 1, "Espaņa", m_rSpain.hWnd, 0 .InsertItem 2, "Brazil", m_rBrazil.hWnd, 2 .InsertItem 3, "Italy", m_rItaly.hWnd, 1 .PaintManager.Appearance = xtpTabAppearancePropertyPage2003 .PaintManager.BoldSelected = True .PaintManager.DisableLunaColors = False .PaintManager.OneNoteColors = True .PaintManager.ShowIcons = True End With  | 
 |
![]()  | 
 |
   
   SuperMario  
   
   Senior Member  
    
   Joined: 14 February 2004 Status: Offline Points: 18057  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 12 July 2006 at 11:01am | 
 
| 
   
    
   Start your tab index at 0: 
   
  .InsertItem 0, "Espaņa", m_rSpain.hWnd, 0 .InsertItem 1, "Brazil", m_rBrazil.hWnd, 2 .InsertItem 2, "Italy", m_rItaly.hWnd, 1  | 
 |
![]()  | 
 |
    Post Reply  
   | 
  |
|       
  
  Tweet   	
    | 
 
| Forum Jump | Forum Permissions  ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum  |