Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - TabControl: Programaticly select a tab
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

TabControl: Programaticly select a tab

 Post Reply Post Reply
Author
Message
fernando View Drop Down
Groupie
Groupie
Avatar

Joined: 22 May 2006
Status: Offline
Points: 25
Post Options Post Options   Thanks (0) Thanks(0)   Quote fernando Quote  Post ReplyReply Direct Link To This Post Topic: TabControl: Programaticly select a tab
    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
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
fernando View Drop Down
Groupie
Groupie
Avatar

Joined: 22 May 2006
Status: Offline
Points: 25
Post Options Post Options   Thanks (0) Thanks(0)   Quote fernando Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.