PanelDblClick Event Example

This example adds two Panel objects to a StatusBar control. When the user double-clicks on the control, the text of the clicked Panel object is displayed. To try the example, place a StatusBar control on a form and paste the code into the form's Declarations section. Run the example and double-click on the control.

Private Sub Form_Load()
Dim I as Integer
   For I = 1 to 2
      StatusBar1.Panels.Add
   Next I

   With StatusBar1.Panels 
      .Item(1).Text = "A long piece of information."
      .Item(1).AutoSize = sbrContents   ' Content
      .Item(2).Style = sbrDate   ' Date style
      .Item(2).AutoSize = sbrContents   ' Content
      .Item(3).Style = sbrTime   ' Time style
   End With
End Sub

Private Sub StatusBar1_PanelDblClick(ByVal Panel As Panel)
   MsgBox "Panel.Style = " & Panel.Style
End Sub