# lv_dropdown.h (/api/widgets/dropdown/lv_dropdown_h)



<RelatedHeaders name="lv_dropdown_private.h" isPrivate="false" />

<ApiSummary functions="25" enums="1" macros="1" variables="2" />

Functions [#functions]

<ApiTabs items="[&#x22;Setters (8)&#x22;,&#x22;Getters (10)&#x22;,&#x22;Other (7)&#x22;]">
  <ApiTab value="Setters (8)">
    <ApiMember kind="function" name="lv_dropdown_set_text" file="widgets/dropdown/lv_dropdown.h" line="75" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/dropdown/lv_dropdown.h#L75">
      lv_dropdown_set_text [#lv_dropdown_set_text]

      Set text of the drop-down list's button. If set to `NULL` the selected option's text will be displayed on the button. If set to a specific text then that text will be shown regardless of the selected option.

      ```c title=" " lineNumbers=1
      void lv_dropdown_set_text(lv_obj_t *obj, const char *text)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name   | Type                                             | Description                          |
      | ------ | ------------------------------------------------ | ------------------------------------ |
      | `obj`  | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a drop-down list object   |
      | `text` | `const char *`                                   | the text as a string (Copy is saved) |
    </ApiMember>

    <ApiMember kind="function" name="lv_dropdown_set_text_static" file="widgets/dropdown/lv_dropdown.h" line="84" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/dropdown/lv_dropdown.h#L84">
      lv_dropdown_set_text_static [#lv_dropdown_set_text_static]

      Set text of the drop-down list's button. If set to `NULL` the selected option's text will be displayed on the button. If set to a specific text then that text will be shown regardless of the selected option.

      ```c title=" " lineNumbers=1
      void lv_dropdown_set_text_static(lv_obj_t *obj, const char *text)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name   | Type                                             | Description                                      |
      | ------ | ------------------------------------------------ | ------------------------------------------------ |
      | `obj`  | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a drop-down list object               |
      | `text` | `const char *`                                   | the text as a string (Only its pointer is saved) |
    </ApiMember>

    <ApiMember kind="function" name="lv_dropdown_set_options" file="widgets/dropdown/lv_dropdown.h" line="92" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/dropdown/lv_dropdown.h#L92">
      lv_dropdown_set_options [#lv_dropdown_set_options]

      Set the options in a drop-down list from a string. The options will be copied and saved in the object so the `options` can be destroyed after calling this function

      ```c title=" " lineNumbers=1
      void lv_dropdown_set_options(lv_obj_t *obj, const char *options)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name      | Type                                             | Description                                                            |
      | --------- | ------------------------------------------------ | ---------------------------------------------------------------------- |
      | `obj`     | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to drop-down list object                                       |
      | `options` | `const char *`                                   | a string with '\<br/><br />' separated options. E.g. "One\nTwo\nThree" |
    </ApiMember>

    <ApiMember kind="function" name="lv_dropdown_set_options_static" file="widgets/dropdown/lv_dropdown.h" line="100" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/dropdown/lv_dropdown.h#L100">
      lv_dropdown_set_options_static [#lv_dropdown_set_options_static]

      Set the options in a drop-down list from a static string (global, static or dynamically allocated). Only the pointer of the option string will be saved.

      ```c title=" " lineNumbers=1
      void lv_dropdown_set_options_static(lv_obj_t *obj, const char *options)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name      | Type                                             | Description                                                                   |
      | --------- | ------------------------------------------------ | ----------------------------------------------------------------------------- |
      | `obj`     | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to drop-down list object                                              |
      | `options` | `const char *`                                   | a static string with '\<br/><br />' separated options. E.g. "One\nTwo\nThree" |
    </ApiMember>

    <ApiMember kind="function" name="lv_dropdown_set_selected" file="widgets/dropdown/lv_dropdown.h" line="121" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/dropdown/lv_dropdown.h#L121">
      lv_dropdown_set_selected [#lv_dropdown_set_selected]

      Set the selected option

      ```c title=" " lineNumbers=1
      void lv_dropdown_set_selected(lv_obj_t *obj, uint32_t sel_opt)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name      | Type                                             | Description                                             |
      | --------- | ------------------------------------------------ | ------------------------------------------------------- |
      | `obj`     | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to drop-down list object                        |
      | `sel_opt` | <ApiLink name="uint32_t" />                      | id of the selected option (0 ... number of option - 1); |
    </ApiMember>

    <ApiMember kind="function" name="lv_dropdown_set_dir" file="widgets/dropdown/lv_dropdown.h" line="128" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/dropdown/lv_dropdown.h#L128">
      lv_dropdown_set_dir [#lv_dropdown_set_dir]

      Set the direction of the a drop-down list

      ```c title=" " lineNumbers=1
      void lv_dropdown_set_dir(lv_obj_t *obj, lv_dir_t dir)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                        |
      | ----- | ------------------------------------------------ | ---------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a drop-down list object |
      | `dir` | <ApiLink name="lv_dir_t" />                      | LV\_DIR\_LEFT/RIGHT/TOP/BOTTOM     |
    </ApiMember>

    <ApiMember kind="function" name="lv_dropdown_set_symbol" file="widgets/dropdown/lv_dropdown.h" line="137" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/dropdown/lv_dropdown.h#L137">
      lv_dropdown_set_symbol [#lv_dropdown_set_symbol]

      Set an arrow or other symbol to display when on drop-down list's button. Typically a down caret or arrow.

      ```c title=" " lineNumbers=1
      void lv_dropdown_set_symbol(lv_obj_t *obj, const void *symbol)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name     | Type                                             | Description                                                                              |
      | -------- | ------------------------------------------------ | ---------------------------------------------------------------------------------------- |
      | `obj`    | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to drop-down list object                                                         |
      | `symbol` | `const void *`                                   | a text like `LV_SYMBOL_DOWN`, an image (pointer or path) or NULL to not draw symbol icon |

      <Callout type="info">
        angle and zoom transformation can be applied if the symbol is an image. E.g. when drop down is checked (opened) rotate the symbol by 180 degree
      </Callout>
    </ApiMember>

    <ApiMember kind="function" name="lv_dropdown_set_selected_highlight" file="widgets/dropdown/lv_dropdown.h" line="144" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/dropdown/lv_dropdown.h#L144">
      lv_dropdown_set_selected_highlight [#lv_dropdown_set_selected_highlight]

      Set whether the selected option in the list should be highlighted or not

      ```c title=" " lineNumbers=1
      void lv_dropdown_set_selected_highlight(lv_obj_t *obj, bool en)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                              |
      | ----- | ------------------------------------------------ | ---------------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to drop-down list object         |
      | `en`  | <ApiLink name="bool" />                          | true: highlight enabled; false: disabled |
    </ApiMember>
  </ApiTab>

  <ApiTab value="Getters (10)">
    <ApiMember kind="function" name="lv_dropdown_get_list" file="widgets/dropdown/lv_dropdown.h" line="155" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/dropdown/lv_dropdown.h#L155">
      lv_dropdown_get_list [#lv_dropdown_get_list]

      Get the list of a drop-down to allow styling or other modifications

      ```c title=" " lineNumbers=1
      lv_obj_t * lv_dropdown_get_list(lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                        |
      | ----- | ------------------------------------------------ | ---------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a drop-down list object |

      **Returns:** <ApiLink name="lv_obj_t" display="lv_obj_t *" /> — pointer to the list of the drop-down
    </ApiMember>

    <ApiMember kind="function" name="lv_dropdown_get_text" file="widgets/dropdown/lv_dropdown.h" line="162" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/dropdown/lv_dropdown.h#L162">
      lv_dropdown_get_text [#lv_dropdown_get_text]

      Get text of the drop-down list's button.

      ```c title=" " lineNumbers=1
      const char * lv_dropdown_get_text(lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                        |
      | ----- | ------------------------------------------------ | ---------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a drop-down list object |

      **Returns:** `const char *` — the text as string, `NULL` if no text
    </ApiMember>

    <ApiMember kind="function" name="lv_dropdown_get_options" file="widgets/dropdown/lv_dropdown.h" line="169" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/dropdown/lv_dropdown.h#L169">
      lv_dropdown_get_options [#lv_dropdown_get_options]

      Get the options of a drop-down list

      ```c title=" " lineNumbers=1
      const char * lv_dropdown_get_options(const lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                                   | Description                      |
      | ----- | ------------------------------------------------------ | -------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="const lv_obj_t *" /> | pointer to drop-down list object |

      **Returns:** `const char *` — the options separated by '\<br/>
      '-s (E.g. "Option1\nOption2\nOption3")
    </ApiMember>

    <ApiMember kind="function" name="lv_dropdown_get_selected" file="widgets/dropdown/lv_dropdown.h" line="176" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/dropdown/lv_dropdown.h#L176">
      lv_dropdown_get_selected [#lv_dropdown_get_selected]

      Get the index of the selected option

      ```c title=" " lineNumbers=1
      uint32_t lv_dropdown_get_selected(const lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                                   | Description                      |
      | ----- | ------------------------------------------------------ | -------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="const lv_obj_t *" /> | pointer to drop-down list object |

      **Returns:** <ApiLink name="uint32_t" /> — index of the selected option (0 ... number of option - 1);
    </ApiMember>

    <ApiMember kind="function" name="lv_dropdown_get_option_count" file="widgets/dropdown/lv_dropdown.h" line="183" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/dropdown/lv_dropdown.h#L183">
      lv_dropdown_get_option_count [#lv_dropdown_get_option_count]

      Get the total number of options

      ```c title=" " lineNumbers=1
      uint32_t lv_dropdown_get_option_count(const lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                                   | Description                      |
      | ----- | ------------------------------------------------------ | -------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="const lv_obj_t *" /> | pointer to drop-down list object |

      **Returns:** <ApiLink name="uint32_t" /> — the total number of options in the list
    </ApiMember>

    <ApiMember kind="function" name="lv_dropdown_get_selected_str" file="widgets/dropdown/lv_dropdown.h" line="191" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/dropdown/lv_dropdown.h#L191">
      lv_dropdown_get_selected_str [#lv_dropdown_get_selected_str]

      Get the current selected option as a string

      ```c title=" " lineNumbers=1
      void lv_dropdown_get_selected_str(const lv_obj_t *obj, char *buf, uint32_t buf_size)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name       | Type                                                   | Description                              |
      | ---------- | ------------------------------------------------------ | ---------------------------------------- |
      | `obj`      | <ApiLink name="lv_obj_t" display="const lv_obj_t *" /> | pointer to drop-down object              |
      | `buf`      | `char *`                                               | pointer to an array to store the string  |
      | `buf_size` | <ApiLink name="uint32_t" />                            | size of `buf` in bytes. 0: to ignore it. |
    </ApiMember>

    <ApiMember kind="function" name="lv_dropdown_get_option_index" file="widgets/dropdown/lv_dropdown.h" line="199" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/dropdown/lv_dropdown.h#L199">
      lv_dropdown_get_option_index [#lv_dropdown_get_option_index]

      Get the index of an option.

      ```c title=" " lineNumbers=1
      int32_t lv_dropdown_get_option_index(lv_obj_t *obj, const char *option)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name     | Type                                             | Description                 |
      | -------- | ------------------------------------------------ | --------------------------- |
      | `obj`    | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to drop-down object |
      | `option` | `const char *`                                   | an option as string         |

      **Returns:** <ApiLink name="int32_t" /> — index of `option` in the list of all options. -1 if not found.
    </ApiMember>

    <ApiMember kind="function" name="lv_dropdown_get_symbol" file="widgets/dropdown/lv_dropdown.h" line="206" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/dropdown/lv_dropdown.h#L206">
      lv_dropdown_get_symbol [#lv_dropdown_get_symbol]

      Get the symbol on the drop-down list. Typically a down caret or arrow.

      ```c title=" " lineNumbers=1
      const char * lv_dropdown_get_symbol(lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                      |
      | ----- | ------------------------------------------------ | -------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to drop-down list object |

      **Returns:** `const char *` — the symbol or NULL if not enabled
    </ApiMember>

    <ApiMember kind="function" name="lv_dropdown_get_selected_highlight" file="widgets/dropdown/lv_dropdown.h" line="213" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/dropdown/lv_dropdown.h#L213">
      lv_dropdown_get_selected_highlight [#lv_dropdown_get_selected_highlight]

      Get whether the selected option in the list should be highlighted or not

      ```c title=" " lineNumbers=1
      bool lv_dropdown_get_selected_highlight(lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                      |
      | ----- | ------------------------------------------------ | -------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to drop-down list object |

      **Returns:** <ApiLink name="bool" /> — true: highlight enabled; false: disabled
    </ApiMember>

    <ApiMember kind="function" name="lv_dropdown_get_dir" file="widgets/dropdown/lv_dropdown.h" line="220" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/dropdown/lv_dropdown.h#L220">
      lv_dropdown_get_dir [#lv_dropdown_get_dir]

      Get the direction of the drop-down list

      ```c title=" " lineNumbers=1
      lv_dir_t lv_dropdown_get_dir(const lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                                   | Description                        |
      | ----- | ------------------------------------------------------ | ---------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="const lv_obj_t *" /> | pointer to a drop-down list object |

      **Returns:** <ApiLink name="lv_dir_t" /> — LV\_DIR\_LEF/RIGHT/TOP/BOTTOM
    </ApiMember>
  </ApiTab>

  <ApiTab value="Other (7)">
    <ApiMember kind="function" name="lv_dropdown_create" file="widgets/dropdown/lv_dropdown.h" line="62" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/dropdown/lv_dropdown.h#L62">
      lv_dropdown_create [#lv_dropdown_create]

      Create a drop-down list object

      ```c title=" " lineNumbers=1
      lv_obj_t * lv_dropdown_create(lv_obj_t *parent)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name     | Type                                             | Description                                                           |
      | -------- | ------------------------------------------------ | --------------------------------------------------------------------- |
      | `parent` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to an object, it will be the parent of the new drop-down list |

      **Returns:** <ApiLink name="lv_obj_t" display="lv_obj_t *" /> — pointer to the created drop-down list
    </ApiMember>

    <ApiMember kind="function" name="lv_dropdown_add_option" file="widgets/dropdown/lv_dropdown.h" line="108" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/dropdown/lv_dropdown.h#L108">
      lv_dropdown_add_option [#lv_dropdown_add_option]

      Add an options to a drop-down list from a string. Only works for non-static options.

      ```c title=" " lineNumbers=1
      void lv_dropdown_add_option(lv_obj_t *obj, const char *option, uint32_t pos)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name     | Type                                             | Description                                                                  |
      | -------- | ------------------------------------------------ | ---------------------------------------------------------------------------- |
      | `obj`    | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to drop-down list object                                             |
      | `option` | `const char *`                                   | a string without '\<br/><br />'. E.g. "Four"                                 |
      | `pos`    | <ApiLink name="uint32_t" />                      | the insert position, indexed from 0, LV\_DROPDOWN\_POS\_LAST = end of string |
    </ApiMember>

    <ApiMember kind="function" name="lv_dropdown_clear_options" file="widgets/dropdown/lv_dropdown.h" line="114" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/dropdown/lv_dropdown.h#L114">
      lv_dropdown_clear_options [#lv_dropdown_clear_options]

      Clear all options in a drop-down list. Works with both static and dynamic options.

      ```c title=" " lineNumbers=1
      void lv_dropdown_clear_options(lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                      |
      | ----- | ------------------------------------------------ | -------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to drop-down list object |
    </ApiMember>

    <ApiMember kind="function" name="lv_dropdown_open" file="widgets/dropdown/lv_dropdown.h" line="230" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/dropdown/lv_dropdown.h#L230">
      lv_dropdown_open [#lv_dropdown_open]

      Open the drop.down list

      ```c title=" " lineNumbers=1
      void lv_dropdown_open(lv_obj_t *dropdown_obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name           | Type                                             | Description                      |
      | -------------- | ------------------------------------------------ | -------------------------------- |
      | `dropdown_obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to drop-down list object |
    </ApiMember>

    <ApiMember kind="function" name="lv_dropdown_close" file="widgets/dropdown/lv_dropdown.h" line="236" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/dropdown/lv_dropdown.h#L236">
      lv_dropdown_close [#lv_dropdown_close]

      Close (Collapse) the drop-down list

      ```c title=" " lineNumbers=1
      void lv_dropdown_close(lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                      |
      | ----- | ------------------------------------------------ | -------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to drop-down list object |
    </ApiMember>

    <ApiMember kind="function" name="lv_dropdown_is_open" file="widgets/dropdown/lv_dropdown.h" line="243" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/dropdown/lv_dropdown.h#L243">
      lv_dropdown_is_open [#lv_dropdown_is_open]

      Tells whether the list is opened or not

      ```c title=" " lineNumbers=1
      bool lv_dropdown_is_open(lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                        |
      | ----- | ------------------------------------------------ | ---------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a drop-down list object |

      **Returns:** <ApiLink name="bool" /> — true if the list os opened
    </ApiMember>

    <ApiMember kind="function" name="lv_dropdown_bind_value" file="widgets/dropdown/lv_dropdown.h" line="253" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/dropdown/lv_dropdown.h#L253">
      lv_dropdown_bind_value [#lv_dropdown_bind_value]

      Bind an integer Subject to a Dropdown's value.

      ```c title=" " lineNumbers=1
      lv_observer_t * lv_dropdown_bind_value(lv_obj_t *obj, lv_subject_t *subject)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name      | Type                                                     | Description         |
      | --------- | -------------------------------------------------------- | ------------------- |
      | `obj`     | <ApiLink name="lv_obj_t" display="lv_obj_t *" />         | pointer to Dropdown |
      | `subject` | <ApiLink name="lv_subject_t" display="lv_subject_t *" /> | pointer to Subject  |

      **Returns:** <ApiLink name="lv_observer_t" display="lv_observer_t *" /> — pointer to newly-created Observer
    </ApiMember>
  </ApiTab>
</ApiTabs>

Enums [#enums]

<ApiMember kind="enum" name="_lv_property_dropdown_id_t" file="widgets/dropdown/lv_dropdown.h" line="35" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/dropdown/lv_dropdown.h#L35">
  \_lv_property_dropdown_id_t [#_lv_property_dropdown_id_t]

  | Name                                      | Value                                                              |
  | ----------------------------------------- | ------------------------------------------------------------------ |
  | `LV_PROPERTY_DROPDOWN_TEXT`               | `(LV_PROPERTY_DROPDOWN_START + ((int) 0 )) \| ((  7   ) <<  28 )`  |
  | `LV_PROPERTY_DROPDOWN_OPTIONS`            | `(LV_PROPERTY_DROPDOWN_START + ((int) 1 )) \| ((  7   ) <<  28 )`  |
  | `LV_PROPERTY_DROPDOWN_OPTION_COUNT`       | `(LV_PROPERTY_DROPDOWN_START + ((int) 2 )) \| ((  1   ) <<  28 )`  |
  | `LV_PROPERTY_DROPDOWN_SELECTED`           | `(LV_PROPERTY_DROPDOWN_START + ((int) 3 )) \| ((  1   ) <<  28 )`  |
  | `LV_PROPERTY_DROPDOWN_DIR`                | `(LV_PROPERTY_DROPDOWN_START + ((int) 5 )) \| ((  1   ) <<  28 )`  |
  | `LV_PROPERTY_DROPDOWN_SYMBOL`             | `(LV_PROPERTY_DROPDOWN_START + ((int) 6 )) \| ((  6   ) <<  28 )`  |
  | `LV_PROPERTY_DROPDOWN_SELECTED_HIGHLIGHT` | `(LV_PROPERTY_DROPDOWN_START + ((int) 7 )) \| ((  1   ) <<  28 )`  |
  | `LV_PROPERTY_DROPDOWN_LIST`               | `(LV_PROPERTY_DROPDOWN_START + ((int) 8 )) \| ((  8   ) <<  28 )`  |
  | `LV_PROPERTY_DROPDOWN_IS_OPEN`            | `(LV_PROPERTY_DROPDOWN_START + ((int) 9 )) \| ((  11   ) <<  28 )` |
  | `LV_PROPERTY_DROPDOWN_END`                |                                                                    |
</ApiMember>

Macros [#macros]

<ApiMember kind="macro" name="LV_DROPDOWN_POS_LAST" file="widgets/dropdown/lv_dropdown.h" line="31" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/dropdown/lv_dropdown.h#L31">
  LV_DROPDOWN_POS_LAST [#lv_dropdown_pos_last]

  ```c title=" " lineNumbers=1
  #define LV_DROPDOWN_POS_LAST 0xFFFF
  ```
</ApiMember>

Variables [#variables]

<ApiMember kind="variable" name="lv_dropdown_class" file="widgets/dropdown/lv_dropdown.h" line="50" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/dropdown/lv_dropdown.h#L50">
  lv_dropdown_class [#lv_dropdown_class]

  ```c title=" " lineNumbers=1
  const lv_obj_class_t lv_dropdown_class
  ```
</ApiMember>

<ApiMember kind="variable" name="lv_dropdownlist_class" file="widgets/dropdown/lv_dropdown.h" line="51" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/dropdown/lv_dropdown.h#L51">
  lv_dropdownlist_class [#lv_dropdownlist_class]

  ```c title=" " lineNumbers=1
  const lv_obj_class_t lv_dropdownlist_class
  ```
</ApiMember>

Dependencies [#dependencies]

<FileIncludes includes="[&#x22;lv_conf_internal.h&#x22;, &#x22;lv_label.h&#x22;]" includedBy="[&#x22;lv_dropdown_private.h&#x22;]" transitiveIncludes="[&#x22;lv_anim.h&#x22;, &#x22;lv_area.h&#x22;, &#x22;lv_array.h&#x22;, &#x22;lv_assert.h&#x22;, &#x22;lv_bidi.h&#x22;, &#x22;lv_color.h&#x22;, &#x22;lv_color_op.h&#x22;, &#x22;lv_conf_kconfig.h&#x22;, &#x22;lv_display.h&#x22;, &#x22;lv_draw.h&#x22;, &#x22;lv_draw_arc.h&#x22;, &#x22;lv_draw_blur.h&#x22;, &#x22;lv_draw_buf.h&#x22;, &#x22;lv_draw_image.h&#x22;, &#x22;lv_draw_label.h&#x22;, &#x22;lv_draw_line.h&#x22;, &#x22;lv_draw_rect.h&#x22;, &#x22;lv_draw_triangle.h&#x22;, &#x22;lv_event.h&#x22;, &#x22;lv_ext_data.h&#x22;, &#x22;lv_flex.h&#x22;, &#x22;lv_font.h&#x22;, &#x22;lv_fs.h&#x22;, &#x22;lv_grad.h&#x22;, &#x22;lv_grid.h&#x22;, &#x22;lv_group.h&#x22;, &#x22;lv_image_decoder.h&#x22;, &#x22;lv_image_dsc.h&#x22;, &#x22;lv_indev.h&#x22;, &#x22;lv_layout.h&#x22;, &#x22;lv_ll.h&#x22;, &#x22;lv_log.h&#x22;, &#x22;lv_math.h&#x22;, &#x22;lv_matrix.h&#x22;, &#x22;lv_mem.h&#x22;, &#x22;lv_obj.h&#x22;, &#x22;lv_obj_class.h&#x22;, &#x22;lv_obj_draw.h&#x22;, &#x22;lv_obj_event.h&#x22;, &#x22;lv_obj_pos.h&#x22;, &#x22;lv_obj_property.h&#x22;, &#x22;lv_obj_property_names.h&#x22;, &#x22;lv_obj_scroll.h&#x22;, &#x22;lv_obj_style.h&#x22;, &#x22;lv_obj_style_gen.h&#x22;, &#x22;lv_obj_tree.h&#x22;, &#x22;lv_observer.h&#x22;, &#x22;lv_palette.h&#x22;, &#x22;lv_profiler.h&#x22;, &#x22;lv_profiler_builtin.h&#x22;, &#x22;lv_sprintf.h&#x22;, &#x22;lv_string.h&#x22;, &#x22;lv_style.h&#x22;, &#x22;lv_style_gen.h&#x22;, &#x22;lv_style_properties.h&#x22;, &#x22;lv_symbol_def.h&#x22;, &#x22;lv_text.h&#x22;, &#x22;lv_tick.h&#x22;, &#x22;lv_timer.h&#x22;, &#x22;lv_types.h&#x22;]" />
