Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




How To Use The Tabstrip Control


Pls can someone teach me how to use the tabstrip control? I need to know how to use i to overlap other controls effectively. If possible send some relevant code that can help me to use it. thanks in advance.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Add Control In TabStrip
Currently, i have using the script to add the control in TabStrip. The error prompt said that compile error: Can't assign to read-only property. Any clue how to solve the problem? I tried to set the textbox property for multipleline = true but error prompt said that the visual basic has encountered a problem and needs to close. We are sorry for the inconvenience.

Please help... Thanks...


Below is my script :

Code:
Dim x As Integer
Dim iTab As Integer
Dim iCount As Integer
Dim sFrame As String
Dim sCtlType As String
Dim sCaption As String
Dim sValue As String
Dim j As Integer

bLoading = True
iOldControls = Controls.Count

iCount = 1

For iTab = 1 To 1

If TabStrip1.Tabs.Count < iTab Then
TabStrip1.Tabs.Add
End If
TabStrip1.Tabs(iTab).Caption = "Tab Caption" & CStr(iTab)

sFrame = "Frame" & CStr(TabStrip1.Tabs.Count)
Controls.Add "VB.Frame", sFrame, Me
'Position the frame and set its properties.
With Controls(sFrame)
.Top = TabStrip1.ClientTop + 150
.Left = TabStrip1.ClientLeft + 60
.Height = TabStrip1.ClientHeight - 150
.Width = TabStrip1.ClientWidth - VScroll1.Width - 120
.Visible = False
.ZOrder (0)
End With

colScroll.Add 0, sFrame

For x = 0 To 1

Dim s As Integer
s = 0
For j = 0 To 5
Select Case j
Case 0
sCtlType = "Combobox"
Case 1
sCtlType = "Label"
Case 2 To 5
sCtlType = "Textbox"
s = s + 1
End Select

Select Case sCtlType
Case "Textbox"
Call Controls.Add("VB.TextBox", "Text" & CStr(iCount), Controls(sFrame))
Load Text0(iCount)
Set Text0(iCount).Container = Controls(sFrame)
With Text0(iCount)
.Visible = True
.Width = 2000
.Top = 500 + (x * 2200)
.Tag = .Top
.Left = 1000 + (s * 2030)
.Height = 2000
.Text = sValue
.MultiLine = True
End With
Controls.Remove "Text" & CStr(iCount)
Case "Combobox"
Call Controls.Add("VB.ComboBox", "Combo" & CStr(iCount), Controls(sFrame))
Load Combo0(iCount)
Set Combo0(iCount).Container = Controls(sFrame)
With Combo0(iCount)
.Visible = True
.Width = 2000
.Top = 500 + (x * 2200)
.Tag = .Top
.Left = 600 + (j * 300)
.Text = sValue
.AddItem "Critical"
.AddItem "Important"
.AddItem "Moderate"
End With
Controls.Remove "Combo" & CStr(iCount)
Case "Label"
Call Controls.Add("VB.Label", "Label" & CStr(iCount), Controls(sFrame))
Load Label0(iCount)
Set Label0(iCount).Container = Controls(sFrame)
With Label0(iCount)
.Visible = True
.Width = 1500
.Top = 3200 + (x * 2200)
.Tag = .Top
.Left = 600 + (j * 300)
.Height = 195
.Caption = "Percentage"
End With

End Select
iCount = iCount + 1

Next j


' Add a label for each new control added.

sCaption = CStr(x) + 1
Call Controls.Add("VB.Label", "Label" & CStr(iCount), Controls(sFrame))
Load Label0(iCount)
Set Label0(iCount).Container = Controls(sFrame)
With Label0(iCount)
.Visible = True
.Width = 300
.Top = 200 + (x * 1200)
.Tag = .Top
.Left = 100
.Height = 195
.Caption = sCaption
End With

Next
Controls(sFrame).Tag = x * 400
Next

bLoading = False

TabStrip1.Tabs(1).Selected = True
Call pUpdateScrollBar("Frame1")

About TabStrip Control
Hi,

I've a runtime problem on TabStrips...
When I create a new Tab on a TabStrip control while runtime (like TabStrip1.Tabs.Add) how can I add new controls to this new tab like some buttons or something else?

Thanks, happy programming...

Tabstrip Control
I've used Delphi, and when i got VB, i was surprised that the tabs don't automatically switch pages in design mode. Is there any way around this problem?

TabStrip Control
Hi Guys! I am having some problems with the TabStrip control. I have created a tabstrip on the form and with the use of property pages I have made several tabs. So far, so good. The problem I can't seem to solve is that i can't acess tabs during design time, the control keeps showing me the first tab. So, how do I select the other ones, and how do i put on a tab other controls ( command buttons, textboxes... ), so that they will be shown only on a designated tab and not on all of them?

Using The TabStrip Control
Hello, everyone.
I have a problem with a TabStrip. First, I ask the user how many sections he wants. If the user says 5 sections, the program creates 5 labels and 5 combo boxes (in an array) and displays them. Then, the user selects one of three options from the combo boxes. Fine.
When the user clicks "Next", Form 2 appears and creates one frame for each combo box, but each frame created depends on the option selected; then it creates one tab in the tab strip for every combo box. So, now there are 5 tab strips. I want the user to click on the tabstrip and, depending on which "section" he selected, one of three frames appears.
Example:
I select 5 sections. Now I have 5 combo boxes. I select:
cbo1 = opt1
cbo2 = opt 3
cbo3 = opt 2
cbo4 = opt 3
cbo5 = opt 1

the form creates two fra1, two fra3 and one fra2, depending on the options selected. It also creates 5 tabs in TabStrip. I want that if the user clics on Tab1, fra1(0) appears. If the user clics on Tab2, fra3(0) appears, like this:

click Tab3, fra2(0) appears
click Tab4, fra3(1) appears
click Tab5, fra1(1) appears

How can I do that?

&lt;&gt;&lt;

Tabstrip Control
I'm having a hard time getting items such as the text box to sit on an individual tab of my tabstrip control. It just sits on top. When I change tabs the text box doesn't move. I've used the older tab control with no problems. How can I get it to work properly?

TabStrip Control
All,
Trying to control a TabStrip, but having no luck. I want to specify which tab has focus, based on a which radio button is selected on another form. Does anyone know how to do this? Thanks in advance.

Tabstrip Control
Hi all
1)I want to know that can we change the color of tabstrip control
2)At run time when I select any tab in the tabstrip control the selected tab font change into bold mode in my coding all the tab of tabstrip control changing into bold font

VB Code:
TabStrip1.Font.Bold=True

TabStrip Control
Hi Experts,

I'm Tring to do a Tabbed Browser Using TabStrib and it works well till now But,

How Can I Close The Selected Tab In TabStrip?

How To Use Tabstrip Control In Vb 6.0
hello,
i want to build an application in vb. In one of the forms i want to use tabstrip control. But it is not a container so we have to take any container like frame & controls on that frame. Can any body tell me if i want to take three tabs on which i have to take three different frames along with controls, how i shold display that three different frames on three different tabs?means how to bind that frame control with each individual tab? please give me the entire code. if it is possible at design time then tell me how to do that.

thank u
Ajay

TabStrip Control
Hello:

I am using the Microsoft TabStrip control in my VB6 project.

I want to use the BeforeClick event but I cannot get it to fire. Can anyone help with this problem?

Many thanks,

Stancamp

Tabstrip Control Help Please
hi guys,
i am using the tabstrip control... i know a lot of you do not like it..
but i am using it..
anyway, i have let's say 50 tabs on my tabstrip.., how do i hide certain ones ?

i have tried this:
TabStrip6.TabStop(15).Visible = False

to hide the 15th tab in the tabstrip., but it doesn't like it.


I cannot figure out what controls this.

thanks,
kevin

Tabstrip Control
On the tabstrip control how to I set what tab is selected?

TabStrip Control
how do I change what appears on each tab of the TabStrip?

Tabstrip Control
hi friends
how can i add common controls like labels ,textbox etc. to my tabstrip control
if i try to add a txtbox to my tabstrip ctrl and when i change my tabstrip 's width or hieght txtbox remain's in its original position
how can i solve this problem

TabStrip Control
Hi Everyone,

Has anyone ever used the TabStrip Control? I currently have three tabs that I am using. When I run the program the information for the third tab is automatically displayed. How can I get it to display the information on the first tab automatically by default? I would appreciate any help. Thank you.

TabStrip Control
Can anyone explain how you use this control? For example, I want a button on 2 different tabs. How do i place them on the tabs?

do i have to hide and show them?

Tabstrip Control
im designing my interface and i used the tabstrip control. I added another tab index, but i cant get to tab2. i need to put text boxes on tab 2. i can only access tab 1. hope you guys can help me

Tabstrip Control
How do I make a tab be selected through code??

Thanks.
Danny.

The TabStrip Control
Hey EveryBody:

I am debugging somebody's else program. He has 3 tabs in the tabstrip control. and there is a picture and combo boxes controls in the second tab and there is some regular controls in the third tab.

I want to know how to bring the second tab to the front while I am in the design mode.

Also How can I populate the combe box on the second tab with code, How Can I reference the controls on the second tab in the code.

Tabstrip Control
Hi,

I have a VB6 program I am building where I need to use the tabstrip control to display lots of information on one form. I tried Microsofts site but it did not make much sense as nees three tabs (or more) each displaying different objects such as textboxes etc.

Does anyone know how to use the tabstrip control and can simply explain how I can use it????

Cheers.

TabStrip Control
i don't know where to add the control in tabstrip control.
I mean , i 'm ok to add controls in Tab1 of tabstrip control.
i don't know where i can place controls for Tab2 & 3 & so on....
HELP ME
khine

TabStrip Control
Hi:

I have a tabstrip control where I will have 4 tabs -- how can I place
different items (textboxes, etc...) on each tab? Right now I placed my
first textbox on the first tab, but when I run it all the tabs show the
textbox. I appreciate any help on this. Thanks!

John Moses

Tabstrip Control In ASP.net
I have added Microsoft Tabstrip control, version 6.0
to my webform.I am able to add different tabpage captions.
But on clicking the particular caption it is not moving to that Particular tab.It is always remaing on first tabPage not moving to other tab pages.
How to make it work(simalr to tabcontrol of VB.net(winforms)?

TabStrip Control
Hi there,
This is a real simple problem which I've been trying to solve over the last three hours.
Can somebody please tell me how to edit different tabs in design mode. If I double click the tab I want to design, the code editor is displayed, I just can't find out where on earth I can switch to the other tab.

Help in this matter would be greatly appreciated!

Tabstrip Control
how do you disable a tab on the tabstrip control? The enable property of the tabstrip control enables/disables the tabstrip control itself and not the specified tab.

Thankyou very much

Tabstrip Control
Can anyone help me with the Tabstrip control from the componets in Windows common controls. I have placed one on a form and added an extra tab by right clicking and using the properties but I seem unable to actually get to any additionalk tabs, I can only place items (i.e text box etc) on the first tab. Each time I try clicking on the 2nd,3rd tab nothing happens. Can anyone help . I have tried this on my laptop as well just in case it was a bug on my machine but I am still unable to get to any of the other tabs. Any help greatly appreciated.
Thanks

Fran

Help With The Tabstrip Control
hi,
I've been having problems trying to get the Tabstrip control to do what I want it to.

I have three tabs set up on the tab control.
By default the first tab is selected when the program runs.
Now say I click on a different tab.
My problem is that I want to be able to prevent the user from selecting other tabs unless all conditions have been satisfied (the conditions are irrelevant to my problem).
I have been trying to use to code to re-select the original tab if condtions have not been satisfied, but I don't know how.
What code should I use to select and individual tab as if a user had clicked on it?

thanks

TabStrip Control?
Does anyone have code or link to user-drawn TabStrip control. I have seen vbaccelerator control but it flickers to much.

Please help!

Andrea Batina

Using Tabstrip Control...
I have been searching site for awhile, but am not having much luck. I have a form, and on it I put a tabstrip control. It has four tabs. What I would like is to have it so that depending on what tab is clicked have certain fileds not be visible. But when I try to change the onclick, I get the onclick procedure for the entire tabstrip, how can I change the onclick for each tab? Is this even possible, or do I need to do something else?

Tabstrip Control
Hello. How do I put controls on the second or third tab of a tabstrip control in design timeż
How do I determine which tab was selected during run timeż

Thanx

F. T. W.

Container Tabstrip Control
Does anyone know about a control which look like a VB TabStrip but with more functionality, I mean I need a control with the characteristics of TabStrip that can be like a container too.

Colorizing The TabStrip Control
Hey, anyone know of any way to colorize the tabstrip control without subclassing the darn thing. Subclassing it somehow screws up my menus (which are subclassed)

Is there a control out there somewhere for this to replace the standard TabStrip Control??

Thanks

Click_Event Of Tabstrip-Control ???
Hi!

The Click event of the Tabstrip-Control (not SSTab) is triggered when you release the left Mousebutton, when you perform a Click on a tab. So when I put the code
VB Code:
frameContainer(tabstrip1.selecteditem.index).ZOrder 0
into the Click-Event, and I click during runtime on a Tab and holding down the mousebutton, the tab is already highlighted, but the click_event hasn't been executed, so that the corresponing frame container for that tab isn't loaded.

The point is, that I want the frame Container to be loaded after I've put the Mousebutton down. The problem is that in the mouse_down event of the tabstrip control the property "selecteditem.index" doesn't deliver the index of the tab on which the mousbutton is currently hold down.

Is there any possibility to solve that problem?

regards
alexvb

Question In Tabstrip Control ???
In TabStrip control, is there a way to make the font of one of the active (selected) tab as bold to differentiate it among the other non-selected tabs?

Any thoughts ??

Thanx in advance !!!

MDI Application With TabStrip Control Anyone?
Ok try one of these:

Move dim Idx to the (General)(Declarations) section of the form, I.e. out of all Subs

OR

Add Option Explicit to the top of the form


If you don't have it enabled, enable Option explicit to be added to all new files, it really helps debugging (Tools, Options...find one of the tabs and check "require variable declaration")

Anyway give that a shot and see how it goes.

TabStrip Control - Selected Tab???
On the TabStrip control you can set the Tab Text to bold.

Is there a way to do this, but only for the tab that has focus?

Regards

Hittest(x,y) On A Tabstrip Control?
Anyone know how I can autoselect a Tab in a tabstripcontrol when you drag-over the tabcollection???

In listview or treeview one would use Hittest, but thats not available :-(

Is It Possible To Skin The Tabstrip Control ?
Well.. I've been able to put images on most of the controls, but controls like the tabstrip don't have a DC .. so I'm not sure how to go about skinning it.

Any Suggestions?

Adding A TabStrip Control
I have read all the posts about tabstrip controls - my question i s VERY BASIC! - How do I add such a thing to my form? - I can't find it on the toolbox - is it under one of the menu items?

Thanks

Using Tab Control (TabStrip Alike)
Hi,

I'm trying to use the tabstrip. I created one with 2 tabs. I can place frame on the first tab, but I can't place controls on the second tab in design-time. Is it possible? How?

2. I know that there is another tab control, SStab, and may there are more controls.
Which of them do you believe is the best?

Many thanks!

TabStrip Control Problem?
Hi there,

I have several tabs(see attached file) but can not place textbox control on the different tabs except the first one. How to place control on other tabs? Thanks

Regards

Tabstrip Control Beforeclick Bug
Version 6, SP6 as read from the control's properties About box...

1.) The _beforeclick event doesn't fire if the .tabstyle= 1 or 2 which are button styles.

2.) The .DeselectAll method doesn't deselect tabs when TabStyle = 0, however it will when TabStyle = 1,2.

3. .tabs(i).Selected = true will select a tab, but .tabs(i).selected = false will not deselect a tab.

4.) If the user double-clicks on a tab when the TabStyle = 1,2 the next time the user clicks on a tab, the tab will not select, even though the click event fires, this requires the user to click on the desired tab a second time in order for it to select. As a result of this event firing but a tab is not selected requires the user to run validation loop to test for .selected = true in the event to prevent Error 91. This problem doesn't occur when TabStyle = 0.


Does anyone have a update for this MS half-baked control????

TabStrip Control And A Webbrowser Control
Hello, i am trying to construct my webrowser so that websites can be viewed in one window, instead of loads (cutting down on system resources) I know i'd have to use the Tabstrip control, but how would i do this?


Thankyou, i am awaiting an answer in anticipation

TabStrip Control - Selected Item
Hi,

I have a Tabstrip control and I access the SelectedItem.Index property to get the Active Tab anytime. When a user clicks on different tabs in my application at runtime, I need to know the old tab he was in and also the new tab he wants to go to. I tried to use the BeforeClick event to trap the old tab using selectedItem.index and Click even to trap the new tab using selectedItem.index . But the click event does not fire after BeforeClick and note that I am not using a msgbox either. Is there anything wrong with this or any other way to access the old and new tabs at the same time? Thanks for any help

Prob. For Adding Tab In TabStrip Control
Hi

I am using TabStrip Control in VB6. and have written code like

i = 1
Me.tab_PG_Info.Tabs.Add i, i, "Today = " & Format(now, "yyyy-mm-dd")

But it is giving me run time error 6 - OverFlow !

What could be the reason ??? Pls. help

Also what is the diff. between tabs.remove and tabs.clear ???

Thanks & Regards
Mahesh

Visual Basic Control (tabstrip)
I am having trouble with using tabstrips. I've got 2 tabs,
each of which has a text box, and an option button. When I
run the program and click on the tabs, it does not toggle
back and forth to the appropriate tab that has its
controls. It only displays 1 tab.

SSTab Tabstrip Control Question
How do I add tabs to a SSTab1 control at run-time dynamically? If this is not possible, do the tabs have a Visibkle property so that I can hide/unhide tabs?

Thanks!

Can I Disable A Single Tab On A Tabstrip Control?
Can anybody tell me how to enable / disable a single tab on a tabstrip control programatically? Surely there's a way to do this.

Copyright © 2005-08 www.BigResource.com, All rights reserved