| GtkEventBox |
|---|
| Prev | GtkEventBox Constructor | Next |
|---|
GtkEventBox Constructor
The most common need for a GtkEventBox arises
when a tooltip is required for a non-windowed widget.
Example 16. Giving a GtkLabel a tooltip. <?php
dl('php_gtk.' . (strstr(PHP_OS, 'WIN') ? 'dll' : 'so'));
$window = &new GtkWindow();
$window->set_position(GTK_WIN_POS_CENTER);
$window->connect_object('destroy', array('gtk', 'main_quit'));
$eventbox = &new GtkEventBox();
$label = &new GtkLabel("This is a normal label. It cannot capture
events.");
$eventbox->add($label);
$label->show();
$window->add($eventbox);
$tooltip = &new GtkTooltips();
$tooltip->set_tip($eventbox, "So how did this get here?", null);
$tooltip->enable();
$window->show_all();
gtk::main();
?>
|
|
Network sites:
|
|
Quotes: |
|
Let us not distain glory too much; nothing is finer, except virtue. The height of happiness would be to unite both in this life.Genius creates, and taste preserves. Taste is the good sense of genius; without taste, genius is only sublime folly.
|
|
|