Print Page | Close Window

TabControlItem

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=13270
Printed Date: 22 November 2024 at 4:04pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: TabControlItem
Posted By: rdmeyers
Subject: TabControlItem
Date Posted: 27 January 2009 at 1:18pm

How does one gain access to a collection of TabControlItems  in a TabControl?

Also, TabControl.SelectedItem does not return a TabControlItem so what does it represent???
 



Replies:
Posted By: Oleg
Date Posted: 27 January 2009 at 1:40pm
Hi,
 
Use Item property or indexer TabControl(1).


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: rdmeyers
Date Posted: 27 January 2009 at 3:46pm
Neither TabControl.InsertItem(...) nor TabControl.Item(...) returns a TabControlItem.  All I get is "Nothing" even though the tab is added to the control.  I am adding the tabs at runtime, so is this a problem?


Posted By: Oleg
Date Posted: 28 January 2009 at 1:45am
Jsut tried with new project - works without problems:
 
Private Sub Form_Load()
Dim Item As TabControlItem
Set Item = TabControl1.InsertItem(0, "Item", 0, 0)
Debug.Print Item.Caption
End Sub


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: rdmeyers
Date Posted: 28 January 2009 at 2:50pm
The problem actually manifests itself when the TabControl is wrapped inside of a UserControl.  I was hoping to wrap the control to add some missing functionality to make working with it easier.  It would be nice to be able to access the TabControlItem by a keyname instead of the Index.



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