### Virtual Method

# Gtk AccessibleText set_selection

since: 4.22

#### Declaration [src]

    gboolean
    set_selection (
      GtkAccessibleText* self,
      gsize i,
      GtkAccessibleTextRange* range
    )

#### Description [src]

Sets the caret position.

Available since: 4.22

#### Parameters

`i`

  Type: `gsize`

  The selection to set.

`range`

  Type: `GtkAccessibleTextRange`

  The range to set the selection to.

  The data is owned by the caller of the method.

#### Return value

Type: `gboolean`

True if the selection was updated.