ButtonVisible example for Visual Basic
'Please note the following:
'LEADRasterView1 refers to a LEADRasterView control
'Global declarations
Private WithEvents RasterAnn As LEADRasterAnnotation
Private RasterAnnToolbar As LEADRasterAnnToolBar
'In the Form_Load method:
Set RasterAnn = New LEADRasterAnnotation
Set RasterAnnToolbar = New LEADRasterAnnToolBar
RasterAnn.AnnParentRasterView = LEADRasterView1
Public Sub ToggleVisibleState(AnnToolBar As LEADRasterAnnToolBar, iButtonIndex As Integer)
AnnToolBar.ButtonVisible(iButtonIndex) = Not AnnToolBar.ButtonVisible(iButtonIndex)
MsgBox "Button Index " & iButtonIndex & " visible state is " & AnnToolBar.ButtonVisible(iButtonIndex)
End Sub