How to call an event

I am building a hierarchical listbox and I want to expand the first item (row 0).

The expansion is ‘normally’ handled in ExpandRow(row). However I cannot seem to call ExpandRow(0) anywhere.

Can anybody advise me how to make this call?


Listbox.Exanded(row) = True will expand the row and call the event if the row is not already expanded.

You never call ExpandRow directly… It is called by the framework when the row is expanded by either the above code or the user clicking on the disclosure widget

  • Karen

Thank you, Karen, I will try that immediately.


is there away to simulate clicking on the arrow on the right hand side of a combobox??

Isn’t it just setting the combobox ListIndex?


but when if i don’t have a value to set ?? just curios

If you don’t have a value what would you do with the click?

Are you just looking for the drop-down list to appear?

yeah… just want to simulate the dropdown list to show

That is beyond me…

For OSX click on ‘Move Mouse’

THANKS… exactly what i am thinking of… pity it is only for MacOSX

Clever of Axel to be able to do that, and good as a “proof-of-concept”, but would users find that natural, and would you put that kind of unusual behaviour in commercial software?

That was only an observation - not a criticism Axel :slight_smile:

All Credits go to Jason King
Move mouse cursor and click by code for Mac

Amazing! Thanks for sharing.


i was asking about that because once i was doing some work for a client and wondering it is possible. I can’t remember why though…

It is important to note that move cursor and click is off limit in a sandboxed app. After the thread Axel linked to, I had to abandon the idea for a MAS app I had hoped to use that.