-
sstab Issue
I simple want when user type 1 then it needs to create one tab. but when he type 2 then it needs to create 2 tab.in a way so that . if even he will type
10 it needs to create 10 tab .So let me know .how should i achieve it ? .here are the code.where i am confessing .
Code:
Public Sub CreateTab()
Dim row As Integer
row = 4 'here i don't want to use fixed variable
If Not Text1.Text = "" Then
If Text1.Text > 1 And row > 0 Then SSTab1.Tabs = row
SSTab1.TabsPerRow = 4
'For i = 1 To Row Step 1
'next
End If
End If
End Sub
Private Sub Text1_Change()
CreateTab
End Sub
-
Re: sstab Issue
If I understand correctly the following code should get you going:
Code:
Public Sub CreateTab()
SSTab1.TabsPerRow = 4
If Not Text1.Text = "" Then
If Text1.Text > 1 Then
SSTab1.Tabs = Text1.Text
End If
End If
End Sub
-
Re: sstab Issue
When i type 100 in a text box .why it says invalid property value ?.and yellow line is comming at SSTab1.Tabs = Val(Text1.Text) . let me know .
Code:
Private Sub Command1_Click()
If Text1.Text <> "" Then
If Text1.Text > 0 Then
SSTab1.Tabs = Val(Text1.Text)
SSTab1.TabsPerRow = Val(Text1.Text)
End If
End If
End Sub
-
Re: sstab Issue
99 Tabs is the max on a SSTab Control Im afraid
-
Re: sstab Issue
another point .i simple want when user press tab .it needs to be move at other tab. but it does not work.here is the following code what
i have written .let me know anyone .thx in advance .
Code:
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbTab Then
If SSTab1.Tab > 0 And SSTab1.Tab < SSTab1.Tabs Then
SSTab1.Tab = SSTab1.Tab + 1
Else
SSTab1.Tab = 0
End If
End If
End Sub
-
Re: sstab Issue
Another point with sstab .in the form there are total 5 tab in sstab.in all the tab .there are lots of textbox to type .user type in tab1 ,tab2 & tab3 .but he did not want to use sstab no 5(with index 4) .is there any way to delete this unnessary tab automatically in run time ?.Kindly let me know the idea. any help would be highly appreciated.
Code:
Private Sub txtTabs_Change()
Dim i As Integer
If txtTabs.Text = "" Then
txtTabs.Text = m_Tabs
End If
If Val(txtTabs.Text) >= m_Tabs Then
ServerSelectionTab.Tabs = txtTabs.Text
For i = m_Tabs To Val(txtTabs.Text) - 1
ServerSelectionTab.Tab = i
Load txtServerName(i)
txtServerName(i).Text = "Server" + CStr(i)
txtServerName(i).Left = 1920 ' position the Control
txtServerName(i).Top = 1440
txtServerName(i).Visible = True ' make it visible
txtServerName(i).Container = ServerSelectionTab
'next type of Control is the label
Load LbBranch(i)
LbBranch(i).Left = 600
LbBranch(i).Top = 1500
LbBranch(i).Visible = True
LbBranch(i).Container = ServerSelectionTab
' now we add the header to that Tab page
ServerSelectionTab.Caption = txtServerName(i).Text
Load flxDatabases(i)
' flxDatabases(i).Text = "Server" + CStr(i)
flxDatabases(i).Left = 840
flxDatabases(i).Top = 2400
flxDatabases(i).Visible = True
flxDatabases(i).Container = ServerSelectionTab
Load btAdd(i)
btAdd(i).Left = 840
btAdd(i).Top = 4920
btAdd(i).Visible = True
btAdd(i).Container = ServerSelectionTab
Next ' Tab Page
Else ' we have to much controls so we delete the uselessones
here ' we have to much controls so we delete the uselessones
So please let me know anybody .End If
m_Tabs = txtTabs.Text
' set the actual tab back to the first one
ServerSelectionTab.Tab = 0
End Sub