How to make a custom combobox?

Combo boxes can override onGenerateWidget, this allows you to feed it user widgets. Example:

Ignore the sound bit.