PHP-GTK
Thursday, August 21, 2014 
download | documentation | applications | faq | changelog | resources 


search for in the  


previousaccel-changed
GtkAccelLabel Constructornext

Last updated: Sun, 12 May 2013
view this page in English

GtkAccelLabel

A label which displays an accelerator key on the right of the text

Object Hierarchy

Description

The GtkAccelLabel widget is a subclass of GtkLabel that also displays an accelerator key on the right of the label text, e.g. 'Ctl+S'. It is commonly used in menus to show the keyboard short-cuts for commands.

The accelerator key to display is not set explicitly. Instead, the GtkAccelLabel displays the accelerators which have been added to a particular widget. This widget is set by calling set_accel_widget() .

For example, a GtkMenuItem widget may have an accelerator added to emit the "activate" signal when the 'Ctl+S' key combination is pressed. A GtkAccelLabel is created and added to the GtkMenuItem, and set_accel_widget() is called with the GtkMenuItem as the second argument. The GtkAccelLabel will now display 'Ctl+S' after its label.

A GtkAccelLabel will only display accelerators which have Gtk::ACCEL_VISIBLE set (see GtkAccelFlags). A GtkAccelLabel can display multiple accelerators and even signal names, though it is almost always used to display just one accelerator key.

Constructors

GtkAccelLabel (string label);

-- Creates a new GtkAccelLabel.

Methods

accelerator_width()
  DEPRECATED.
get_accel_widget()
  Fetches the widget monitored by this accelerator label.
get_accel_width()
  Returns the width needed to display the accelerator key(s).
refetch()
  Recreates the string representing the accelerator keys.
set_accel_widget()
  Sets the widget to be monitored by this accelerator label.


User Contributed Notes
gtk.gtkaccellabel.php
add a note about notes
There are no user contributed notes for this page.


previousaccel-changed
GtkAccelLabel Constructornext

Last updated: Sun, 12 May 2013
view this page in English


credits 

PHP  Copyright © 2001-2014 The PHP Group
 All rights reserved.
Last updated: Sun May 12 20:50:56 2013 CEST