GFTabString/TabStringfrm1.frm
VERSION 5.00
Begin VB.Form TabStringfrm1
BackColor = &H0000C000&
Caption = "TabString1"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4635
LinkTopic = "Form1"
Picture = "TabStringfrm1.frx":0000
ScaleHeight = 3195
ScaleWidth = 4635
StartUpPosition = 3 'Windows‑Standard
Begin VB.CommandButton Command2
Caption = "select tab 3"
Height = 315
Left = 60
TabIndex = 6
Top = 2820
Width = 1455
End
Begin VB.CommandButton Command1
Caption = "change font"
Height = 315
Left = 1560
TabIndex = 5
Top = 2820
Width = 1455
End
Begin VB.CheckBox Check1
Caption = "Visible"
Height = 195
Left = 3060
TabIndex = 4
Top = 2880
Value = 1 'Aktiviert
Width = 1515
End
Begin VB.PictureBox TabHeaderTextSizePicture
Enabled = 0 'False
Height = 270
Left = 0
ScaleHeight = 210
ScaleWidth = 120
TabIndex = 3
Top = 0
Visible = 0 'False
Width = 180
End
Begin VB.HScrollBar HScroll1
Height = 255
Left = 300
TabIndex = 2
Top = 1500
Width = 2535
End
Begin VB.TextBox Text1
Height = 435
Left = 1620
TabIndex = 1
Text = "Text1"
Top = 960
Width = 1215
End
Begin VB.ListBox List1
Height = 450
Left = 300
TabIndex = 0
Top = 960
Width = 1215
End
Begin VB.Line GFTabStringLine
BorderColor = &H00000000&
Index = 0
Visible = 0 'False
X1 = 0
X2 = 1335
Y1 = 0
Y2 = 0
End
End
Attribute VB_Name = "TabStringfrm1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim TabString1 As New GFTabStringcls
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
'on error resume next
With TabString1
If .GFTabString_MouseDown(X, Y) = True Then
Call .TabHeader_Refresh
Call .TabBox_Refresh
Else
'do nothing
End If
End With
End Sub
Private Sub Form_Load()
'on error resume next
With TabString1
Call .TabString_Create("Test1", TabStringfrm1, TabStringfrm1, 10, 30, 190, 100)
Call .TabBox_Add
Call .TabHeader_Add("Editor")
Call .TabHeader_Add("Editorformat")
Call .TabHeader_Add("Dampfschiff")
Call .TabString_AddControl(List1, 1)
Call .TabString_AddControl(Text1, 2)
Call .TabString_AddControl(HScroll1, 3)
Call .TabHeader_Refresh
Call .TabBox_Refresh
End With
End Sub
Private Sub Check1_Click()
'on error resume next
If Check1.Value = 1 Then
TabString1.Visible = True
Else
TabString1.Visible = False
End If
End Sub
Private Sub Command1_Click()
'on error resume next
TabString1.ForeColor = RGB(255, 200, 0)
Call TabString1.SetFont("Arial", 8, True, True, False, False)
End Sub
Private Sub Command2_Click()
'on error resume next
Call TabString1.TabHeader_Select(3)
End Sub
Private Sub Form_Resize()
'on error resume next
TabString1.Width = TabStringfrm1.Width ‑ 50 * Screen.TwipsPerPixelX
TabString1.Height = TabStringfrm1.Height ‑ 150 * Screen.TwipsPerPixelY
End Sub
[END OF FILE]