Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.41 KB | None | 0 0
  1. <?php
  2.  
  3. // ---
  4. $box = new GtkBox(GtkOrientation::VERTICAL);
  5.  
  6. // ---
  7. $button1 = GtkButton::new_with_label("Botão 1");
  8. $box->pack_start($button1, TRUE, TRUE);
  9.  
  10. // ---
  11. $button2 = clone $button1;
  12.  
  13. $button2->set_label("Botão 2");
  14. $box->pack_start($button2, TRUE, TRUE);
  15.  
  16. // ---
  17. $win = new GtkWindow();
  18. $win->add($box);
  19.  
  20. // ---
  21. $win->show_all();
  22. $win->connect("destroy", ["Gtk", "main_quit"]);
  23. Gtk::main();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement