Webhosting and cheap domain registration service
  

 Home

GtkMenuItem
Prev GtkMenuItem Constructor Next

GtkMenuItem Constructor

GtkMenuItem ([string label ]);

The syntax

will create a single item in a menu with the label Edit. However this label is really a GtkAccelLabel, and has the ability to display any keyboard shortcuts - known as accelerators - associated with it.

For more information on setting up accelerator display in this way, see add_accelerator() . There is also a working example in the GtkMenu constructor section of this manual.

Underlining an accelerator key within the label text is a separate issue, and can be achieved by calling the GtkLabel method parse_uline() from the accelerator label. A string passed using this method will overwrite any existing text in the label.

Much of the above is to some extent automated in the GtkItemFactory API, and different methods may apply when setting up a GtkItemFactory-generated menu.

Note that it is not possible to add a GtkHSeparator object to either a GtkMenuItem or a GtkMenu. The current workaround for this is to create an empty menu item and then toggle its sensitivity so that it cannot be inadvertently selected by the end user:


Prev Home Next
GtkMenuItem Up GtkMenuItem::set_submenu

 

  

Network sites:

Cheap domain registrar's cheap domain registration service

$8.95 domain registration : Buy domain name or register domain name 

 
 
Quotes:
There's nothing remarkable about it. All one has to do is hit the right keys at the right time and the instrument plays itself.  
 
 

Disclaimer: This documentation is provided only for the benefits of our webhosting customers.
For authoritative source of the documentation, please refer to http://gtk.php.net/docs.php