set_attached_to


Description:

[ Version ( since = "3.4" ) ]
public void set_attached_to (Widget? attach_widget)

Marks this as attached to attach_widget.

This creates a logical binding between the window and the widget it belongs to, which is used by GTK+ to propagate information such as styling or accessibility to this as if it was a children of attach_widget.

Examples of places where specifying this relation is useful are for instance a Menu created by a ComboBox, a completion popup window created by Entry or a typeahead search entry created by TreeView.

Note that this function should not be confused with set_transient_for, which specifies a window manager relation between two toplevels instead.

Passing null for attach_widget detaches the window.

Parameters:

this

a Window

attach_widget

a Widget, or null




2022 vala-language.org