w3-tools.com - Free Webmaster Tools and Resources
 
w3-tools.com - Free Webmaster Tools and Resources
 Free Webmaster Tools and Resources

 



PHP-GTK Manual

This manual is provided as a courtesy. It is not an official source. Please check gtk.php.net for updated information.

PHP-GTK Manual

PHP-GTK Manual

GtkButton

A container widget that emits a signal when clicked on.

Object Hierarchy

GtkObject
`-- GtkWidget
       `-- GtkContainer
              `-- GtkBin
                     `-- GtkButton

Direct subclasses

Description

The GtkButton widget is a container widget that can hold any valid child widget derived from GtkWidget. The most commonly used child widget is a GtkLabel. This is therefore built into the constructor as an optional parameter.

The GtkButton widget is mainly used to call some function when the button is pressed.

To change the label after the button is created, you can use the children() function of the container class:

//$obj is the button object
$childs = $obj->children();
$childs[0]->set_text('new button title');

Constructor

GtkButton ([string label ]);
-- Creates a button.

Methods

pressed()
  Emits "pressed" signal.
released()
  Emits "released" signal.
clicked()
  Emits "clicked" signal.
enter()
  Emits "enter" signal.
leave()
  Emits "leave" signal.
set_relief()
  Sets the button relief style.
get_relief()
  Gets the button relief style.

Signals

"enter"
  Emitted when the cursor is over the button.
"pressed"
  Emitted when the button is initially pressed.
"clicked"
  Emitted when the button is clicked.
"released"
  Emitted when the button is released.
"leave"
  Emitted when the cursor leaves the button area.

Newsletter

Join to our newsletter and receive news and updates about our site.
Your name: 
E-mail address: 
Action: 
 

Hosted by

Search

Google
Web w3-tools.com

Links

  What is my IP? Find your IP address!     Valid XHTML 1.0 Transitional  
Copyright © 2006. by w3-tools.com. All rights reserved