PHP-GTK
Saturday, November 01, 2014 
download | documentation | applications | faq | changelog | resources 


search for in the  


previousGtkExpander
GtkExpander Constructornext

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

GtkExpander Constructor

GtkExpander (string label);

Creates a new expander object using the parameter as the text of the label. The example below illustrates the usage of the constructor.

Example 62. Using Expander to Show/Hide details GtkExpander

<?php
//Creating the callbacks for handling basic window functions
function onDestroy()
{
    Gtk::main_quit();
}
 
//Creating and initialising a new window to add our expander to
$window = new GtkWindow();
$window->connect('destroy', 'onDestroy');
$window->set_title('GtkExpander Demo');
$window->set_default_size(250, 60);
$window->set_border_width(10);
 
//Creating a new expander object
$expander = new GtkExpander('Expander');
 
//Creating a label to store details
$label = new GtkLabel('Details can be shown or hidden');
 
//Adding the details to the expander
$expander->add($label);
 
//Adding the expander to the window
$window->add($expander);
 
//Displaying the window and starting the main loop
$window->show_all();
Gtk::main();
?>

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


previousGtkExpander
GtkExpander 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:57 2013 CEST