AnnSetAutoMenuItemEnable Example for Visual Basic
Note: This topic is for Document/Medical only.
'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
Private Sub Command17_Click()
' disable the Delete menu item from all the selected objects
RasterAnn.AnnSetAutoMenuItemEnable RasterAnn.AnnContainer, 0, ANN_AUTOTEXT_MENU_DELETE, ANN_MENU_DISABLED, ANN_FLAG_RECURSE + ANN_FLAG_SELECTED, ""
' disable the Delete menu item from all the ellipse objects
RasterAnn.AnnSetAutoMenuItemEnable RasterAnn.AnnAutomation, ANN_OBJECT_ELLIPSE, ANN_AUTOTEXT_MENU_DELETE, ANN_MENU_DISABLED, 0, ""
End Sub