Advertisement
Guest User

Window.vala

a guest
Mar 11th, 2016
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Vala 0.74 KB | None | 0 0
  1. using Gtk;
  2.  
  3. class Contacts : Gtk.Window{
  4.  
  5.     public Contacts(){
  6.         this.set_title("Contacts");
  7.         this.set_resizable(true);
  8.         this.set_default_size(1000,500);
  9.     }
  10.    
  11.     private void pack(){
  12.         Gtk.Stack stack = new Gtk.Stack();
  13.         Gtk.StackSidebar side = new Gtk.StackSidebar();
  14.         Gtk.Label label = new Gtk.Label("Label Qualquer 1");
  15.        
  16.         stack.add_named(label, "Pagina 1");
  17.         side.set_stack(stack);
  18.         this.add(stack);
  19.  
  20.     }
  21.  
  22.     public void run(){
  23.         this.pack();
  24.         this.show_all();
  25.     }
  26. }
  27.  
  28. public static int main(string[] args){
  29.     Gtk.init(ref args);
  30.     Contacts c = new Contacts();
  31.     c.run();
  32.     Gtk.main();
  33.    
  34.    
  35.     return 0;
  36.  
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement