PHP-GTK
Sunday, December 21, 2014 
download | documentation | applications | faq | changelog | resources 


search for in the  


previousGtkComboBox Constructor
GtkComboBox::append_textnext

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

GtkComboBox Constructor

The new_text function is a convenience function that constructs a new text combo box, which is a GtkComboBox just displaying strings. If you use this function to create a text combo box, you should only manipulate its data source with the following convenience methods: append_text() , prepend_text() , insert_text() and remove_text()

Example 50. Creating a Text GtkComboBox

<?php
// Create a new window.
$window = new GtkWindow();
 
// Set the window up to close cleanly.
$window->connect_simple('destroy', array('Gtk', 'main_quit'));
 
// Create a text combobox.
$combo = GtkComboBox::new_text();
 
// Add some values.
$combo->append_text('New Jersey');
$combo->append_text('New Mexico');
$combo->append_text('New York');
 
// Add the combobox to the window.
$window->add($combo);
 
// Show the window and its contents.
$window->show_all();
 
// Start the main loop.
Gtk::main();
?>

This method must be called statically.


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


previousGtkComboBox Constructor
GtkComboBox::append_textnext

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