Dynamic ListBox

How can I create a listbox at runtime on my MainWindow?. I tried the following instructions but the ListBox is not displayed on the screen:
Dim datalist As new Listbox

You can’t instantiate controls at runtime.
The only option is to clone controls, provided that you already have a master one and it’s member of a control set.
Just create an hidden listbox and, at runtime, size and show it in the right place. Or make a clone with “new myListbox”.

You can’t directly. Basically you either you need one on the window already (it can me invisible or off screen), or you can put one in a container control and embed that in the window at runtime.

To confirm: If I have a custom OS X control and a generic listbox for other platforms, I need to put one of each, regardless, and call the one I need at runtime.

Correct. Or use a ContainerControl.