Can someone tell me which code I need to write to have an automatically fillup dropdown-list property in widgets?
Or point me to the documentation?
I don't think it's possible, the drop down list in property panel is meant to reference the selected value in a widget - not the list of possible values.
I hope I understood your issue.
Retrieving data ...