vertextitle.cls

来自「二叉树的遍历、线索化、遍历线索化二叉树等算法;深度搜索优先、广度搜索优先算法」· CLS 代码 · 共 50 行

CLS
50
字号
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "VertexTitle"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Private txtIndex() As Integer
Private txtNum As Integer
Private txtBox() As TextBox
Private Sub Class_Initialize()
txtNum = 0
ReDim txtIndex(txtNum)
ReDim txtBox(txtNum)
End Sub
Public Sub SetTxtBox(Text As TextBox)
    Set txtBox(0) = Text
End Sub
Public Property Get GetTxtNum()
    GetTxtNum = txtNum
End Property
Public Sub Append(ByVal PosX As Single, ByVal PosY As Single, ByVal sTitle As String, bSelect As Boolean)
    txtNum = txtNum + 1
    ReDim Preserve txtBox(txtNum)
    ReDim Preserve txtIndex(txtNum)
    Load txtBox(txtNum)
    txtBox(txtNum).Left = PosX
    txtBox(txtNum).Top = PosY
    txtBox(txtNum).Text = sTitle
    txtBox(txtNum).Visible = True
    If bSelect Then
        txtBox(txtNum).SelStart = 0
        txtBox(txtNum).SelLength = Len(txtBox(txtNum).Text)
        txtBox(txtNum).SetFocus
    End If
End Sub
Public Sub ClsTxtBox()
    For i = 1 To txtNum
        Unload txtBox(i)
    Next i
    txtNum = 0
    ReDim txtIndex(txtNum)
End Sub

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?