Gtk2_EntryDialog::new_simple() – Simplified constructor with not so much parameters.


require_once 'Gtk2/EntryDialog.php';

Gtk2_EntryDialog Gtk2_EntryDialog::new_simple ( string $message , string $default = null , GtkWindow $parent = null )


Simplified constructor with not so much parameters.

Message type is Gtk::MESSAGE_QUESTION, the flags will be Gtk::DIALOG_MODAL if the parent is set. Only one button, OK, will be visible.

require_once 'Gtk2/EntryDialog.php';

$id Gtk2_EntryDialog::new_simple(
'What\'s your name?',       //the message
'Don\'t know'               //The default text

$answer $id->run();
if (
$answer == Gtk::RESPONSE_OK) {
'The name is: ';
} else {
"You cancelled\r\n";


string $message

Message to display.

string $default

Default text for the entry.

GtkWindow $parent

Parent window (can be null).

Create a entry dialog instance. (Previous) Show the dialog and retrieve the text (Next)
Last updated: Fri, 09 Oct 2015 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report or add a note.
View this page in:

User Notes:

There are no user contributed notes for this page.