GtkAccelLabel

GtkAccelLabel

A label that can display an accelerator key next to the text.

Object Hierarchy

GtkObject
`-- GtkWidget
       `-- GtkMisc
              `-- GtkLabel
                     `-- GtkAccelLabel

Direct subclasses

None.

Description

A GtkAccelLabel is a label capable of displaying any accelerator, modifier keys and signal set on a GtkMenuItem or similar widget.

In PHP-GTK this is effectively an internal widget, as an accelerator label is created the moment a text string is passed to a menu item. It is therefore unlikely that you will ever need to use the constructor, or any of the methods that this class directly provides. However, you may need to access it, for instance to parse an underline in a label's text string or to retrieve a menu's textual content.

To access the GtkAccelLabel within an existing menu item, use the following code:

You will then be able to call most of the methods available to a new instance of a GtkAccelLabel.

Constructor

GtkAccelLabel (string string);
-- Constructs a label for displaying accelerator information.

Methods

get_accel_width()
  Sets width to accommodate accelerator information.
set_accel_widget()
  Associates accelerator label with specified widget.
refetch()
  Recreates accelerator information.

© Copyright 2003-2023 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.