AnsweredAssumed Answered

Other options besides text in View.PopupMenu?

Question asked by nathaniel.arbizu on Sep 3, 2014

The documentation for View.Popup menu shows an array of strings are passed in. This creates a list of text items.

 

Is it possible to get separators? Can an item in the list get a check mark? What about a bmp icon?

 

I am looking to possibly add a check mark next to a line item to show a feature has been enabled. See the following prototype code:

 

Dim strArray, ans, useFeature1, useFeature2
useFeature1 = False
useFeature2 = False
strArray = Split("Cancel Popup|Feature 1 Enabled|Feature 2 Enabled|Done", "|")
ans = pcbDoc.ActiveView.PopupMenu(UBound(strArray)+1, strArray)
If ans = 1 Then
     'Toggle Feature 1
     useFeature1 = (Not useFeature1)
End If
If ans = 2 Then
     'Toggle Feature 2
     useFeature2 = (Not useFeature2)
End If

Outcomes