constructor Gtk2_EntryDialog (Previous) (Next) Gtk2_EntryDialog::get

View this page in Last updated: Mon, 02 Jul 2007
English | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Plain HTML

Gtk2_EntryDialog::new_simple()

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

Opis

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.


<?php
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();
$id->destroy();
if ($answer == Gtk::RESPONSE_OK) {
    echo 'The name is: ';
    var_dump($id->get_text());
} else {
    echo "You cancelled\r\n";
}
?>

Parametr

string $message

Message to display.

string $default

Default text for the entry.

GtkWindow $parent

Parent window (can be null).

constructor Gtk2_EntryDialog (Previous) (Next) Gtk2_EntryDialog::get

Download Documentation Last updated: Mon, 02 Jul 2007
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.