Esempio n. 1
0
        private void SetupRelative()
        {
            XScale.SetRange(1, 200);
            XScale.SetIncrements(1, 10);
            XScale.Value = rx;

            YScale.SetRange(1, 200);
            YScale.SetIncrements(1, 10);
            YScale.Value = ry;
        }
Esempio n. 2
0
        private void AttachWidgets(TextView textView)
        {
            // This is really different from the C version, but the
            // C versions seems a little pointless.

            Button button = new Button("Click Me");

            button.Clicked += new EventHandler(EasterEggCB);
            textView.AddChildAtAnchor(button, buttonAnchor);
            button.ShowAll();

            ComboBox combo = ComboBox.NewText();

            combo.AppendText("Option 1");
            combo.AppendText("Option 2");
            combo.AppendText("Option 3");

            textView.AddChildAtAnchor(combo, menuAnchor);

            HScale scale = new HScale(null);

            scale.SetRange(0, 100);
            scale.SetSizeRequest(70, -1);
            textView.AddChildAtAnchor(scale, scaleAnchor);
            scale.ShowAll();

            Gtk.Image image = Gtk.Image.LoadFromResource("floppybuddy.gif");
            textView.AddChildAtAnchor(image, animationAnchor);
            image.ShowAll();

            Entry entry = new Entry();

            textView.AddChildAtAnchor(entry, entryAnchor);
            entry.ShowAll();
        }
Esempio n. 3
0
        // Handlers
        // Handlers :: OnTickEvent
        private void OnTickEvent(int pos)
        {
            if (set_position_timeout_id > 0)
            {
                return;
            }

            UpdateLabel(pos);

            // Update slider
            from_tick = true;
            song_slider.SetRange(0, player.PlayingSong.Duration);

            if (pos > player.PlayingSong.Duration)
            {
                return;
            }

            song_slider.Value = pos;
        }
Esempio n. 4
0
 protected override void UpdateView()
 {
     hScale.SetRange(min, max);
     hScale.SetIncrements(step, page);
     hScale.Sensitive = Command.CanExecute();
 }