Component with dropdown

What do you want to achieve? Incorporate a drop down widget into a component

What have you tried so far? Added a drop down into a panel with other text and buttons. Created a component. When I export the ui, the dropdown code is missing from ui_screen1.c . I also added a dropdown outside the component and that drop down exports to the ui_screen1.c code

Screenshot or video


  • SquareLine Studio version: 1.40
  • Operating system: Windows11
  • Target hardware: elecrow esp3s3 5 inch display

Addition - Created a container with a drop down, and a panel with a drop down and then turned them into components. The drop down did not “compile” into ui_screen1.

This is not a bug but the intended operation. When you create a component it’s made in ‘ui/components’ folder as a .c file in which you can find the dropdown. But if you want to reach the dropdown inside the component from outside, you’ll need to get it by something like ui_comp_get_child( ui_PanelComponent, UI_COMP_PANELCOMPONENT_DROPDOWN1 ) (the parameters to ui_comp_get_child should be replaced with yours. To find the ID/hook of the widget inside the component you can either modify some property of the dropdown in SquareLine Studio inspector and check the result in the screen C code, or you can check the component’s header-file for defines in ‘ui/components’-folder. )