def update_widget_subform(self):
        """Change the subform according to widget kind."""
        ### retrieve value from widget kind option menu
        value = self.widget_kind_options.get()

        ### use the value as key to retrieve the subform to
        ### be used for the widget_subform attribute
        self.widget_subform = self.subform_map[value]

        ### reposition form elements
        self.reposition_form_elements()
Change the subform according to widget kind.
nodezator/editing/widgetpicker/main.py