Xojo2024R2.1: context menu item - how to show it as disabled?

Often WebListBox control has context menu that shows various options available for selected row. However, sometimes the option is dependent not just on selected item but also on something else, let’s say the dataset linked to the selected item in the list.

I am not sure if that is possible but I would like to show the menu item as disabled for selected row under certain conditions. Is this doable?

WebMenuItem has an Enabled property so it is certainly possible.

1 Like

Ah yes, I see it. The context menu is created in the Shown event so I suppose I should be able to run the query there to see if certain menu item has to be enabled or disabled. Thanks for pointing this out to me.