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



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

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

Functions [#functions]

<ApiTabs items="[&#x22;Setters (10)&#x22;,&#x22;Getters (10)&#x22;,&#x22;Other (7)&#x22;]">
  <ApiTab value="Setters (10)">
    <ApiMember kind="function" name="lv_dropdown_set_text" file="public/widgets/lv_dropdown.h" line="77" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_dropdown.h#L77">
      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). **May** be `NULL`. When NULL the selected option's text is displayed. |
    </ApiMember>

    <ApiMember kind="function" name="lv_dropdown_set_text_static" file="public/widgets/lv_dropdown.h" line="87" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_dropdown.h#L87">
      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). **May** be `NULL`. When NULL the selected option's text is displayed. |
    </ApiMember>

    <ApiMember kind="function" name="lv_dropdown_set_text_translation_tag" file="public/widgets/lv_dropdown.h" line="97" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_dropdown.h#L97">
      lv_dropdown_set_text_translation_tag [#lv_dropdown_set_text_translation_tag]

      Assign a translation tag for the drop-down list's button text. Memory will be allocated to store the tag. The button text will automatically update when the language is changed via `lv_translation_set_language`.

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

      <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 |
      | `tag` | `const char *`                                   | '\0' terminated character string.  |
    </ApiMember>

    <ApiMember kind="function" name="lv_dropdown_set_options" file="public/widgets/lv_dropdown.h" line="107" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_dropdown.h#L107">
      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="public/widgets/lv_dropdown.h" line="115" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_dropdown.h#L115">
      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_options_translation_tag" file="public/widgets/lv_dropdown.h" line="126" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_dropdown.h#L126">
      lv_dropdown_set_options_translation_tag [#lv_dropdown_set_options_translation_tag]

      Assign a translation tag for the options of the drop-down list. Memory will be allocated to store the tag. The options will automatically update when the language is changed via `lv_translation_set_language`. The translation should contain the options in a '\<br/>
      ' separated list. E.g. "One\nTwo\nThree"

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

      <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 |
      | `tag` | `const char *`                                   | '\0' terminated character string.  |
    </ApiMember>

    <ApiMember kind="function" name="lv_dropdown_set_selected" file="public/widgets/lv_dropdown.h" line="149" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_dropdown.h#L149">
      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` | `uint32_t`                                       | id of the selected option (0 ... number of option - 1); |
    </ApiMember>

    <ApiMember kind="function" name="lv_dropdown_set_dir" file="public/widgets/lv_dropdown.h" line="156" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_dropdown.h#L156">
      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="public/widgets/lv_dropdown.h" line="166" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_dropdown.h#L166">
      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` or an image (pointer or path). **May** be `NULL`. When NULL no symbol icon is drawn. |

      <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="public/widgets/lv_dropdown.h" line="173" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_dropdown.h#L173">
      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`  | `bool`                                           | true: highlight enabled; false: disabled |
    </ApiMember>
  </ApiTab>

  <ApiTab value="Getters (10)">
    <ApiMember kind="function" name="lv_dropdown_get_list" file="public/widgets/lv_dropdown.h" line="184" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_dropdown.h#L184">
      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="public/widgets/lv_dropdown.h" line="191" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_dropdown.h#L191">
      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="public/widgets/lv_dropdown.h" line="198" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_dropdown.h#L198">
      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="public/widgets/lv_dropdown.h" line="205" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_dropdown.h#L205">
      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:** `uint32_t` — index of the selected option (0 ... number of option - 1);
    </ApiMember>

    <ApiMember kind="function" name="lv_dropdown_get_option_count" file="public/widgets/lv_dropdown.h" line="212" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_dropdown.h#L212">
      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:** `uint32_t` — the total number of options in the list
    </ApiMember>

    <ApiMember kind="function" name="lv_dropdown_get_selected_str" file="public/widgets/lv_dropdown.h" line="220" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_dropdown.h#L220">
      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` | `uint32_t`                                             | size of `buf` in bytes. 0: to ignore it. |
    </ApiMember>

    <ApiMember kind="function" name="lv_dropdown_get_option_index" file="public/widgets/lv_dropdown.h" line="228" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_dropdown.h#L228">
      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:** `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="public/widgets/lv_dropdown.h" line="235" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_dropdown.h#L235">
      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="public/widgets/lv_dropdown.h" line="242" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_dropdown.h#L242">
      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:** `bool` — true: highlight enabled; false: disabled
    </ApiMember>

    <ApiMember kind="function" name="lv_dropdown_get_dir" file="public/widgets/lv_dropdown.h" line="249" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_dropdown.h#L249">
      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="public/widgets/lv_dropdown.h" line="63" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_dropdown.h#L63">
      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 a parent widget **May** be `NULL`.. When NULL, the widget is created as a screen on the default display. |

      **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="public/widgets/lv_dropdown.h" line="136" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_dropdown.h#L136">
      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`    | `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="public/widgets/lv_dropdown.h" line="142" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_dropdown.h#L142">
      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="public/widgets/lv_dropdown.h" line="259" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_dropdown.h#L259">
      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="public/widgets/lv_dropdown.h" line="265" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_dropdown.h#L265">
      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="public/widgets/lv_dropdown.h" line="272" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_dropdown.h#L272">
      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:** `bool` — true if the list os opened
    </ApiMember>

    <ApiMember kind="function" name="lv_dropdown_bind_value" file="public/widgets/lv_dropdown.h" line="282" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_dropdown.h#L282">
      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="public/widgets/lv_dropdown.h" line="35" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/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="public/widgets/lv_dropdown.h" line="31" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/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="public/widgets/lv_dropdown.h" line="50" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/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="public/widgets/lv_dropdown.h" line="51" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/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;lvgl.h&#x22;]" transitiveIncludes="[&#x22;lv_anim.h&#x22;, &#x22;lv_area.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_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_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_symbol_def.h&#x22;, &#x22;lv_text.h&#x22;, &#x22;lv_timer.h&#x22;, &#x22;lv_types.h&#x22;]" />
