Gtk2_EntryDialog::new_simple (Previous) (Next) Gtk2_EntryDialog::run

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

Gtk2_EntryDialog::get()

Gtk2_EntryDialog::get()  -- Show the dialog and retrieve the text

Opis

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";
}
?>

Parametr

string $message

Message to display.

string $default

Default text for the entry.

GtkWindow $parent

Parent window (can be null).

Zwracana wartość

returns False if the user cancelled input, the text (string) otherwise.

Gtk2_EntryDialog::new_simple (Previous) (Next) Gtk2_EntryDialog::run

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.