PHP-GTK
Monday, November 24, 2014 
download | documentation | applications | faq | changelog | resources 


search for in the  


previousGtkNotebook
GtkNotebook::append_pagenext

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

GtkNotebook Constructor

Creates a new GtkNotebook widget with no pages.

Example 104. Creating a GtkNotebook

<?php
//Create a new notebook
$ntbk = new GtkNotebook();
 
//Create a first page, no label
$ntbk->append_page(new GtkLabel('This is the first child'));
 
//Create the second page, this time with an extra label
$ntbk->append_page(
    new GtkLabel('This is the second child'),
    new GtkLabel('Second')
);
 
//Create the third page, with an icon as label and
//some nested childs
$vbox = new GtkVBox();
$vbox->pack_start(new GtkLabel('This is the third child'));
$vbox->pack_start(new GtkEntry(), false, false);
$vbox->pack_start(new GtkButton('Test'), false, false);
$ntbk->append_page(
    $vbox,
    GtkImage::new_from_stock(
        Gtk::STOCK_ADD,
        Gtk::ICON_SIZE_MENU
    )
);
 
 
//The rest of the setup is standard
$wnd = new GtkWindow();
$wnd->set_default_size(300, -1);
$wnd->connect_simple('destroy', array('Gtk', 'main_quit'));
$wnd->add($ntbk);
$wnd->show_all();
Gtk::main();
?>

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


previousGtkNotebook
GtkNotebook::append_pagenext

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:59 2013 CEST