Gtk.Widget ClockControls()
        {
            var vbox = new Gtk.VBox {
                Spacing = 6
            };

            this.clock = new AnalogClock();
            this.clock.SetSizeRequest(130, 130);
            vbox.PackStart(this.clock, true, true, 0);

            var spinners = new Gtk.HBox {
                Spacing = 6
            };

            spinners.PackStart(new Gtk.Label("Hour"), false, false, 0);

            hourSpin = CreateSpinner(24, 1, null);
            spinners.PackStart(hourSpin, false, false, 0);

            spinners.PackStart(new Gtk.Label("Min"), false, false, 0);

            minutesSpin = CreateSpinner(60, 10, hourSpin);
            spinners.PackStart(minutesSpin, false, false, 0);

            spinners.PackStart(new Gtk.Label("Sec"), false, false, 0);

            secondsSpin = CreateSpinner(60, 10, minutesSpin);
            spinners.PackStart(secondsSpin, false, false, 0);

            vbox.PackEnd(spinners, false, false, 0);

            return(vbox);
        }
Exemple #2
0
		Gtk.Widget ClockControls ()
		{

#if GTK2
			var vbox = new Gtk.VBox ();
			var spinners = new Gtk.HBox ();
#else
			var vbox = new Gtk.HBox ();
			var spinners = new Gtk.VBox ();
#endif
			vbox.Spacing = 6;
			spinners.Spacing = 6;

			clock = new AnalogClock();
			clock.SetSizeRequest (130, 130);
			vbox.PackStart(clock, true, true, 0);


			spinners.PackStart (new Gtk.Label ("Hour"), false, false, 0);
			
			hourSpin = CreateSpinner (24, 1, null);
			spinners.PackStart (hourSpin, false, false, 0);

			spinners.PackStart (new Gtk.Label ("Min"), false, false, 0);

			minutesSpin = CreateSpinner (60, 10, hourSpin);
			spinners.PackStart (minutesSpin, false, false, 0);
			
			spinners.PackStart (new Gtk.Label ("Sec"), false, false, 0);

			secondsSpin = CreateSpinner (60, 10, minutesSpin);
			spinners.PackStart (secondsSpin, false, false, 0);
			
			vbox.PackEnd (spinners, false, false, 0);

			return vbox;
		}