Private Sub Form_Resize() Dim i As Integer Dim key As String key = "a" StatusBar1.Panels.Clear For i = 1 To 5 StatusBar1.Panels.Add i, key, "aa" StatusBar1.Panels(i).Width = Me.Width \ 5 key = key & "a" Next i End Sub
Private Sub Form_Click()
Dim i As Integer For i = 1 To 5 With StatusBar1.Panels.Add(i, "p" & i, "panel" & i, sbrText) .Alignment = sbrCenter .Bevel = sbrInset .Width = StatusBar1.Width / 5 End With Next i
End Sub
Private Sub Form_Load() Dim i As Integer With StatusBar1 .Panels.Clear For i = 1 To 5 .Panels.Add (.Panels.Count + 1), "key" & i, "new" & i .Panels(i).AutoSize = sbrSpring Next i End With End Sub
sorry , 上面代码有点问题Private Sub Form_Load() Dim i As Integer With StatusBar1 .Panels.Clear For i = 1 To 5 .Panels.Add (.Panels.Count + 1), "key" & i, "new" & i .Panels(i).AutoSize = sbrSpring .Panels(i).MinWidth = 1 Next i End With End Sub
Dim i As Integer
Dim key As String
key = "a"
StatusBar1.Panels.Clear
For i = 1 To 5
StatusBar1.Panels.Add i, key, "aa"
StatusBar1.Panels(i).Width = Me.Width \ 5
key = key & "a"
Next i
End Sub
Dim i As Integer
For i = 1 To 5
With StatusBar1.Panels.Add(i, "p" & i, "panel" & i, sbrText)
.Alignment = sbrCenter
.Bevel = sbrInset
.Width = StatusBar1.Width / 5
End With
Next i
End Sub
Dim i As Integer
With StatusBar1
.Panels.Clear
For i = 1 To 5
.Panels.Add (.Panels.Count + 1), "key" & i, "new" & i
.Panels(i).AutoSize = sbrSpring
Next i
End With
End Sub
Dim i As Integer
With StatusBar1
.Panels.Clear
For i = 1 To 5
.Panels.Add (.Panels.Count + 1), "key" & i, "new" & i
.Panels(i).AutoSize = sbrSpring
.Panels(i).MinWidth = 1
Next i
End With
End Sub