Object Hierarchy:

Object hierarchy for LinkButton


[ CCode ( type_id = "gtk_link_button_get_type ()" ) ]
public class LinkButton : Button, Accessible, Actionable, Buildable, ConstraintTarget

A `GtkLinkButton` is a button with a hyperlink.

![An example GtkLinkButton](link-button.png)

It is useful to show quick links to resources.

A link button is created by calling either [] or [ctor@Gtk.LinkButton.new_with_label]. If using the former, the URI you pass to the constructor is used as a label for the widget.

The URI bound to a `GtkLinkButton` can be set specifically using [method@Gtk.LinkButton.set_uri].

By default, `GtkLinkButton` calls [func@Gtk.show_uri] when the button is clicked. This behaviour can be overridden by connecting to the [ signal@Gtk.LinkButton:GtkLinkButton:activate-link] signal and returning true from the signal handler.

CSS nodes

`GtkLinkButton` has a single CSS node with name button. To differentiate it from a plain `GtkButton`, it gets the .link style class.


`GtkLinkButton` uses the gtk_accessible_role_link role.

Namespace: Gtk
Package: gtk4



Creation methods:



Inherited Members:

All known members inherited from class Gtk.Widget