Advertisement
Guest User

Untitled

a guest
May 29th, 2015
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.86 KB | None | 0 0
  1.     use php\swing\UIForm;
  2.     use php\swing\UIEditorArea;
  3.     use php\swing\UIButton;
  4.     use php\io\Stream;
  5.     use php\io\FileStream;  
  6.     use php\lang\System;
  7.  
  8.     $form = new UIForm();
  9.     $form->size = [550, 600];
  10.     $form->title = 'Stream::getContents';
  11.     $form->moveToCenter();
  12.    
  13.     $form->on('windowClosing', function(){
  14.        System::halt(0);
  15.     });
  16.  
  17.     $u = new UIEditorArea();
  18.     $u->size = [450, 450];
  19.     $u->position = [40, 20];
  20.     $u->contentType = "text/html";
  21.     $u->text = "";
  22.     $form->add($u);
  23.  
  24.     $button = new UIButton();
  25.     $button->size = [100, 30];
  26.     $button->position = [200, 500];
  27.     $button->text = 'OK!';
  28.     $button->on('click', function() use ($u) {
  29.     $u->text = Stream::getContents('http://community.develstudio.ru/forum.php');
  30.     });
  31.     $form->add($button);
  32.  
  33.     $form->visible = true;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement