PopupClass - SetItemCheck How to change Checkmark Icon?

Have been scratching my head to find where the Popup class sets the icon used when PopupItems.Check = State:On. I would like to change the icon to be consistent with others in my App along with adding an icon to be used when PopupItems.Check = State:Off.

Any insights?

There was a pretty extensive discussion of popup customization here.

See if any of that is helpful. If not, then can you be more specific on exactly what you are trying to do.

A quick summary of my code:
a) Add popup menu item
b) Call SetItemCheck to make the menu item On/Off
c) Set appropriate variable to menu check state
All is good at this point.

Now I want to derive (or just change) the class to customize the check icon displayed on popup menu items for BOTH On & Off. In the Popup class, no icon is used when the menu item is Off. I have made changes to set that. However, when the menu item is On, the Popup class seems to override any setting and uses something else. Hopefully clear enough?

Have you looked at ABPOPUP.CLW?

If I search for ".check ", in there, I see lots of stuff. And there are methods such as SetItemCheck and GetItemCheck in there that show up too.

Not sure how to derive that, because it’s a private method, but it looks like you need to modify PopupClass.GetMenuText(), particularly in the ExtendedItems ROUTINE.

I’m not sure what the ramifications are for fiddling around with this. If you have menu items based on buttons via AddItemMimic(), etc, then part of that code tests to see if any of the mimic’d items have to display icons, then it does extra stuff.

But PopupClass.GetMenuText() is where I’d start playing.

The SELF.NoIcons property was put there at my request, btw :slight_smile:

CHECK Menu items is Windows OS Menu feature that must change the check look (icon) based on theme, visual styles, etc. Does the IMenuStyle Interface would allow check icon changes?

Maybe make an Item with an Icon and change the Icon using your own On/Off Variable as the user clicks it.

Exactly where I had been making changes to test. The Off icon displays, but the On icon would not. Seems like Carl is correct about it being an OS feature and needing to write my own class code to control. I appreciate the explanation for what I was seeing.