# lv_tileview.h (/api/widgets/tileview/lv_tileview_h)



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

<ApiSummary functions="5" variables="2" />

Functions [#functions]

<ApiTabs items="[&#x22;Setters (2)&#x22;,&#x22;Getters (1)&#x22;,&#x22;Other (2)&#x22;]">
  <ApiTab value="Setters (2)">
    <ApiMember kind="function" name="lv_tileview_set_tile" file="widgets/tileview/lv_tileview.h" line="54" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/tileview/lv_tileview.h#L54">
      lv_tileview_set_tile [#lv_tileview_set_tile]

      Set the active tile in the tileview.

      ```c title=" " lineNumbers=1
      void lv_tileview_set_tile(lv_obj_t *tv, lv_obj_t *tile_obj, lv_anim_enable_t anim_en)
      ```

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

      | Name       | Type                                             | Description                                           |
      | ---------- | ------------------------------------------------ | ----------------------------------------------------- |
      | `tv`       | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> |                                                       |
      | `tile_obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to the tile object to be set as active        |
      | `anim_en`  | <ApiLink name="lv_anim_enable_t" />              | animation enable flag (LV\_ANIM\_ON or LV\_ANIM\_OFF) |
    </ApiMember>

    <ApiMember kind="function" name="lv_tileview_set_tile_by_index" file="widgets/tileview/lv_tileview.h" line="63" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/tileview/lv_tileview.h#L63">
      lv_tileview_set_tile_by_index [#lv_tileview_set_tile_by_index]

      Set the active tile by index in the tileview

      ```c title=" " lineNumbers=1
      void lv_tileview_set_tile_by_index(lv_obj_t *tv, uint32_t col_id, uint32_t row_id, lv_anim_enable_t anim_en)
      ```

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

      | Name      | Type                                             | Description                                           |
      | --------- | ------------------------------------------------ | ----------------------------------------------------- |
      | `tv`      | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to the tileview object                        |
      | `col_id`  | <ApiLink name="uint32_t" />                      | column id of the tile to be set as active             |
      | `row_id`  | <ApiLink name="uint32_t" />                      | row id of the tile to be set as active                |
      | `anim_en` | <ApiLink name="lv_anim_enable_t" />              | animation enable flag (LV\_ANIM\_ON or LV\_ANIM\_OFF) |
    </ApiMember>
  </ApiTab>

  <ApiTab value="Getters (1)">
    <ApiMember kind="function" name="lv_tileview_get_tile_active" file="widgets/tileview/lv_tileview.h" line="70" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/tileview/lv_tileview.h#L70">
      lv_tileview_get_tile_active [#lv_tileview_get_tile_active]

      Get the currently active tile in the tileview

      ```c title=" " lineNumbers=1
      lv_obj_t * lv_tileview_get_tile_active(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 the tileview object |

      **Returns:** <ApiLink name="lv_obj_t" display="lv_obj_t *" /> — pointer to the currently active tile object
    </ApiMember>
  </ApiTab>

  <ApiTab value="Other (2)">
    <ApiMember kind="function" name="lv_tileview_create" file="widgets/tileview/lv_tileview.h" line="36" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/tileview/lv_tileview.h#L36">
      lv_tileview_create [#lv_tileview_create]

      Create a tileview object

      ```c title=" " lineNumbers=1
      lv_obj_t * lv_tileview_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 tileview |

      **Returns:** <ApiLink name="lv_obj_t" display="lv_obj_t *" /> — pointer to the created tileview
    </ApiMember>

    <ApiMember kind="function" name="lv_tileview_add_tile" file="widgets/tileview/lv_tileview.h" line="46" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/tileview/lv_tileview.h#L46">
      lv_tileview_add_tile [#lv_tileview_add_tile]

      Add a tile to the tileview

      ```c title=" " lineNumbers=1
      lv_obj_t * lv_tileview_add_tile(lv_obj_t *tv, uint8_t col_id, uint8_t row_id, lv_dir_t dir)
      ```

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

      | Name     | Type                                             | Description                        |
      | -------- | ------------------------------------------------ | ---------------------------------- |
      | `tv`     | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to the tileview object     |
      | `col_id` | <ApiLink name="uint8_t" />                       | column id of the tile              |
      | `row_id` | <ApiLink name="uint8_t" />                       | row id of the tile                 |
      | `dir`    | <ApiLink name="lv_dir_t" />                      | direction to move to the next tile |

      **Returns:** <ApiLink name="lv_obj_t" display="lv_obj_t *" /> — pointer to the added tile object
    </ApiMember>
  </ApiTab>
</ApiTabs>

Variables [#variables]

<ApiMember kind="variable" name="lv_tileview_class" file="widgets/tileview/lv_tileview.h" line="24" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/tileview/lv_tileview.h#L24">
  lv_tileview_class [#lv_tileview_class]

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

<ApiMember kind="variable" name="lv_tileview_tile_class" file="widgets/tileview/lv_tileview.h" line="25" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/tileview/lv_tileview.h#L25">
  lv_tileview_tile_class [#lv_tileview_tile_class]

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

Dependencies [#dependencies]

<FileIncludes includes="[&#x22;lv_obj.h&#x22;]" includedBy="[&#x22;lv_tileview_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_internal.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_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_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;]" />
