Print Page | Close Window

TabControl: Programaticly select a tab

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=4581
Printed Date: 17 November 2024 at 7:24am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: TabControl: Programaticly select a tab
Posted By: fernando
Subject: TabControl: Programaticly select a tab
Date Posted: 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



Replies:
Posted By: SuperMario
Date 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.


Posted By: fernando
Date Posted: 12 July 2006 at 10:57am
Originally posted by SuperMario SuperMario wrote:

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.


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


Posted By: SuperMario
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net