PHPマニュアル/PEARマニュアル | ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot

GtkMenuItem Constructor | JavaScript入門&応用&リファレンスなら「JavaScriptist」

  

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:

忘却曲線を使ってこの知識を確実に記憶に残す

フォーラムで「GtkMenuItem Constructor」について話す
各種マニュアル: PHPマニュアル | PEARマニュアル | Smarty(英語)マニュアル | PHP-GTKマニュアル | GtkMenuItem Constructor」をGoogle検索
copyright © 1997-2024 PHP ドキュメント作成グループ(ライセンス). provided by php spot. マニュアル: