Gtk2_EntryDialog
[ class tree: Gtk2_EntryDialog ] [ index: Gtk2_EntryDialog ] [ all elements ]

Source for file normal.php

Documentation is available at normal.php

  1. <?php
  2. /**
  3. *   Normal Gtk2_EntryDialog example
  4. *
  5. *   @author Christian Weiske <cweiske@php.net>
  6. */
  7. require_once 'Gtk2/EntryDialog.php';
  8.  
  9. $id = new Gtk2_EntryDialog(
  10.     null,                       //parent window
  11.     0,                          //flags (GtkDialogFlags)
  12.     Gtk::MESSAGE_QUESTION,      //type of message
  13.     Gtk::BUTTONS_OK_CANCEL,     //which buttons shall be there
  14.     'What\'s your name?',       //the message
  15.     'Don\'t know'               //The default text
  16. );
  17.  
  18. $answer $id->run();
  19. $id->destroy();
  20. if ($answer == Gtk::RESPONSE_OK{
  21.     echo 'The name is: ';
  22.     var_dump($id->get_text());
  23. else {
  24.     echo "You cancelled\r\n";
  25. }
  26. ?>

Documentation generated on Mon, 11 Mar 2019 14:48:47 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.