Adw.Sidebar.set_selected

### Method

# Adw Sidebarset_selected

since: 1.9

#### Declaration [src]

    void
    adw_sidebar_set_selected (
      AdwSidebar* self,
      guint selected
    )

#### Description [src]

Selects the item at `selected`.

If set to `GTK_INVALID_LIST_POSITION`, no item is selected.

If `AdwSidebar:mode` is set to `ADW_SIDEBAR_MODE_PAGE`, the selection is invisible, but still tracked, indicating which item will be selected once the mode is changed to `ADW_SIDEBAR_MODE_SIDEBAR`.

See also: `AdwSidebar:selected-item`.

Available since: 1.9

Sets property | `Adw.Sidebar:selected`

#### Parameters

`selected`

  Type: `guint`

  Index of the newly selected item.