Method

GtkLabelset_mnemonic_widget

Declaration [src]

void
gtk_label_set_mnemonic_widget (
  GtkLabel* self,
  GtkWidget* widget
)

Description [src]

Associate the label with its mnemonic target.

If the label has been set so that it has a mnemonic key (using i.e. gtk_label_set_markup_with_mnemonic(), gtk_label_set_text_with_mnemonic(), gtk_label_new_with_mnemonic() or the GtkLabel: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 GtkButton or a GtkNotebook tab) it is automatically associated with the correct widget, but sometimes (i.e. when the target is a GtkEntry 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.

Parameters

widget

Type: GtkWidget

The target GtkWidget, or NULL to unset.

The argument can be NULL.
The data is owned by the caller of the method.