I have a listbox with clickable headings. When a heading is clicked a popupmenu becomes visible, simulating a popupmenu within a listbox. In the pic below it is the column with the “Date” heading.
Once the new heading is chosen, the PopupMenu becomes invisible and then option loads into the Listbox heading.
The problem is that when the heading is clicked, the PopupMenu is visible, but in its collapsed state (because the Popupmenu itself has not been clicked).
it then takes another click on the PopupMenu itself to expand it to show the options.
Is there any way to programatically make a PopupMenu visible, active and expanded (as if it has already been clicked)?
On Windows, this code in the GotFocus event handler displays the drop-down:
[code] Soft Declare Function SendMessage Lib “user32” Alias “SendMessageA” (ByVal hwnd As Integer, _
ByVal wMsg As UInt32, _
ByVal wParam As Integer, _
param1 As Integer) As Integer