Hi David,
I don't have sample code, but I can give you a few pointers.
- The dropdown that we use is from the closure UI library. It's an instance of goog.ui.Menu.
- Dropdowns (and similar things) live in the WidgetDiv. It's a floating div that lets you render HTML and place it over Blockly.
- The set of calls here is
- createMenu_
- getOptions
- positionMenu
- createWidget
- positionWithAnchor
So you should be able to
- extend FieldDropdown
- override createWidget to insert a text box into your widget, above your menu
- generate menu options
dynamically based on the text in the text box
- call showEditor when the text changes
Hope this helps,
Rachel