constructor Gtk2_EntryDialog

constructor Gtk2_EntryDialog() – Create a entry dialog instance.


require_once 'Gtk2/EntryDialog.php';

void constructor Gtk2_EntryDialog::__construct ( GtkWindow $parent , GtkDialogFlags $flags , GtkMessageType $type , GtkButtonsType $buttons , string $message , string $default )


Creates a new entry dialog instance. After creating it, you can modify it and finally use the run() to show it and await the input.

You might want to use a more simple constructor, e.g. get() or new_simple()

require_once 'Gtk2/EntryDialog.php';

$id = new Gtk2_EntryDialog(
null,                       //parent window
0,                          //flags (GtkDialogFlags)
Gtk::MESSAGE_QUESTION,      //type of message
Gtk::BUTTONS_OK_CANCEL,     //which buttons shall be there
'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";


GtkWindow $parent

Parent window (can be null).

GtkDialogFlags $flags

Dialog flags (use 0 as default)

GtkMessageType $type

Message type (e.g. Gtk::MESSAGE_QUESTION)

GtkButtonsType $buttons

Buttons to show (e.g. Gtk::BUTTONS_OK)

string $message

Message to display.

string $default

Default text for the entry.

About Gtk2_EntryDialog (Previous) Simplified constructor with not so much parameters. (Next)
Last updated: Tue, 13 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.