For information, that's now working, this is the code:

[indent=4]

uses
   Gtk

init
   Gtk.init (ref args)
   var test = new TestWindow ()
   test.show_all ()
   Gtk.main ();

class TestWindow : Window
   slider: HScale
   spin_box : SpinButton
   init
       title = "Test Window"
       default_height = 20
       default_width = 300
       window_position = WindowPosition.CENTER
       destroy += Gtk.main_quit
       spin_box = new SpinButton.with_range (0, 130, 1)
       spin_box.value = 35
       slider = new HScale.with_range (0, 130, 1)
       spin_box.value_changed += def (s)
           slider.set_value(s.get_value ())
       slider.value_changed += def (s)
           spin_box.set_value(s.get_value ())
       var hbox = new HBox (true, 5)
       var button = new Button.with_label("Exit")
       button.clicked += Gtk.main_quit
       hbox.add (spin_box)
       hbox.add (slider)
       hbox.add (button)
       add (hbox)

Nicolas.

_______________________________________________
Vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to