string
Gtk2_EntryDialog::get
(
string $message
,
string $default
,
GtkWindow $parent
)
Creates a dialog with the given parameters, runs it, and returns the text set. If the user cancelled the dialog, this method returns FALSE. In any other case (even when the text is empty), the a string with the text is returned.
<?php
require_once 'Gtk2/EntryDialog.php';
$text = Gtk2_EntryDialog::get(
'What\'s your name?', //the message
'Don\'t know' //The default text
);
if ($text !== false) {
echo 'The name is: ';
var_dump($text);
} else {
echo "You cancelled\r\n";
}
?>
$message
Message to display.
$default
Default text for the entry.
$parent
Parent window (can be null).
returns False if the user cancelled input, the text (string) otherwise.