StatusBar Example


Toggle toggles the status bar on and off.

VBScript Code

Copy Code
Sub Toggle
  StatusBar.Visible = Not StatusBar.Visible
End Sub
Sub NumLayers
  Dim strMessage 
  'If the status bar is not visible, make it visible
  If Not StatusBar.Visible Then
  StatusBar.Visible = True
  End If
  'Display the message
  strMessage = "Total number of layers: " & Map.Layers.Count
  StatusBar.Text(0) = strMessage
End Sub
  'If the coordinate pane of the status bar is disabled, then enable it
  If StatusBar.Style(1) = 67108864 Then
    StatusBar.Style(1) = 0
  End If
  'Make sure the width of the coordinate pane of the status bar is at least 100
  If StatusBar.Width(1) < 100 Then
    StatusBar.Width(1) = 100
  End If
  'Set the coordinate format of the status bar to MGRS
  StatusBar.CoordinateFormat = 5
End Sub