D
Dean Slindee
Is there any way to refer to the .text property of a status bar panel thru
object syntax,
like below (the inner "for" does not work):
Public Function FormStatusBarPaint(ByVal frm As Form) As Integer
Dim obj As New Control
Dim str As String
Dim pnl As StatusBar.StatusBarPanelCollection
For Each obj In frm.Controls
str = obj.GetType.ToString
Select Case str
Case "System.Windows.Forms.StatusBar"
For Each pnl In obj.Controls
pnl(0).Text = "Edit"
pnl(1).Text = "Ready for update"
pnl(2).Text = Today.ToShortDateString
Next
End Select
Next
End Function
Thanks,
Dean Slindee
object syntax,
like below (the inner "for" does not work):
Public Function FormStatusBarPaint(ByVal frm As Form) As Integer
Dim obj As New Control
Dim str As String
Dim pnl As StatusBar.StatusBarPanelCollection
For Each obj In frm.Controls
str = obj.GetType.ToString
Select Case str
Case "System.Windows.Forms.StatusBar"
For Each pnl In obj.Controls
pnl(0).Text = "Edit"
pnl(1).Text = "Ready for update"
pnl(2).Text = Today.ToShortDateString
Next
End Select
Next
End Function
Thanks,
Dean Slindee