Mouse Down does not function in popupmenu on Linux

As a reply to Feedback # 10428, I have been informed that Mouse Down events not firing on Linux platforms is a limitation of the underlying control being used.

Does anyone have suggestions as to how to determine the difference (in an event) of whether the user made a selection in a popupmenu control and when it was changed by the application?

GotFocus and LostFocus events fire when tabbing into the field, but not when clicking. As far as I can tell, the only event that fires is the Change event

The typical pattern for this general problem is to create your own property to track where the change is coming from.

For example, you could set a property called “ChangedByCode” to True before any of your code that changes a PopupMenu value. Set it back to False after.

Then in the Change event handler for the PopupMenu, do something like this:

If Not ChangedByCode Then // Do your stuff here since you know it was changed by the user End If

If that’s the best I can do, I guess I will have to make that work. I was hoping for something at the level of the class of Popupmenu or a subclass I have created that would be “universal” like all the other logic that I have in place for other controls.

This suggestion requires me to remember this special Linux case, every time I add anything that changes the listindex of a popumenu (in code). Anything closer to “automatic” would be better, but as I said, if that is the best option with what we have to work with, so be it.