Gtk.Label.prototype.set_mnemonic_widget
function set_mnemonic_widget(widget:Gtk.Widget):void { // Gjs wrapper for gtk_label_set_mnemonic_widget() }
If the label has been set so that it has an mnemonic key (using i.e. Gtk.Label.prototype.set_markup_with_mnemonic, Gtk.set_text_with_mnemonic, Gtk.new_with_mnemonic or the "use_underline" property) the label can be associated with a widget that is the target of the mnemonic. When the label is inside a widget (like a Gtk.Button or a Gtk.Notebook tab) it is automatically associated with the correct widget, but sometimes (i.e. when the target is a Gtk.Entry next to the label) you need to set it explicitly using this function.
The target widget will be accelerated by emitting the GtkWidget::mnemonic-activate signal on it. The default handler for this signal will activate the widget if there are no mnemonic collisions and toggle focus between the colliding widgets otherwise.
- widget
the target Gtk.Widget