Object Hierarchy:

Gtk.TextView Gtk.TextView Gtk.TextView Gtk.Widget Gtk.Widget Gtk.Widget->Gtk.TextView GLib.InitiallyUnowned GLib.InitiallyUnowned GLib.InitiallyUnowned->Gtk.Widget GLib.Object GLib.Object GLib.Object->GLib.InitiallyUnowned Gtk.Accessible Gtk.Accessible Gtk.Accessible->Gtk.TextView Gtk.Accessible->Gtk.Widget Gtk.Buildable Gtk.Buildable Gtk.Buildable->Gtk.TextView Gtk.Buildable->Gtk.Widget Gtk.ConstraintTarget Gtk.ConstraintTarget Gtk.ConstraintTarget->Gtk.TextView Gtk.ConstraintTarget->Gtk.Widget Gtk.Scrollable Gtk.Scrollable Gtk.Scrollable->Gtk.TextView


[ CCode ( type_id = "gtk_text_view_get_type ()" ) ]
public class TextView : Widget, Accessible, Buildable, ConstraintTarget, Scrollable

A widget that displays the contents of a [class@Gtk.


![An example GtkTextview](multiline-text.png)

You may wish to begin by reading the [conceptual overview](section-text-widget.html), which gives an overview of all the objects and data types related to the text widget and how they work together.

CSS nodes

``` textview.view ├── border.top ├── border.left ├── text │ ╰── [selection] ├── border.right ├── border.bottom ╰── [window.popup] ```

`GtkTextView` has a main css node with name textview and style class .view, and subnodes for each of the border windows, and the main text area, with names border and text, respectively. The border nodes each get one of the style classes .left, .right, .top or .bottom.

A node representing the selection will appear below the text node.

If a context menu is opened, the window node will appear as a subnode of the main node.


`GtkTextView` uses the gtk_accessible_role_text_box role.

Namespace: Gtk
Package: gtk4



Creation methods:



Inherited Members:

All known members inherited from class Gtk.Widget