Can a column in a listbox be a popup menu?

I have a listbox with 4 columns and would like to have one of these columns to be a popup menu so the user can choose text from a list. Is this possible?

@Andr van Haren You cannot make a cell a true popup menu but you should be able to easily emulate it.

Off the top of my head, you can create a PopupMenu subclass in your window, detect a click in your special column, display the PopupMenu and set the cell text to the chosen item.

If you want each cell to correspond to an action, simply use the mousedown/Mouseup events to know which row and column have been clicked.

Use something like that to know which row and column has been clicked:

Dim row As Integer = Me.RowFromXY Dim column As Integer = Me.ColumnFromXY

Return true in mousedown if it is your column menu, and then select the menu in MouseUp.

You may have to work on the color of cells to indicate it is a menu.

See Axel example for this :

Take a look at the examples included with Xojo, specially: