コード例 #1
0
 private void InitSpinBox(HScaleSpinButtonWidget spinbox)
 {
     spinbox.DefaultValue = 16;
     spinbox.MaximumValue = 64;
     spinbox.MinimumValue = 2;
     ContentArea.Add(spinbox);
 }
コード例 #2
0
        private void Build()
        {
            Resizable = false;

            ContentArea.WidthRequest = 400;
            ContentArea.BorderWidth  = 6;
            ContentArea.Spacing      = 6;

            red_spinbox       = new HScaleSpinButtonWidget();
            red_spinbox.Label = Translations.GetString("Red");
            InitSpinBox(red_spinbox);

            green_spinbox       = new HScaleSpinButtonWidget();
            green_spinbox.Label = Translations.GetString("Green");
            InitSpinBox(green_spinbox);

            blue_spinbox       = new HScaleSpinButtonWidget();
            blue_spinbox.Label = Translations.GetString("Blue");
            InitSpinBox(blue_spinbox);

            link_button        = new CheckButton(Translations.GetString("Linked"));
            link_button.Active = true;
            ContentArea.Add(link_button);

            DefaultWidth  = 400;
            DefaultHeight = 300;
            ShowAll();
        }
コード例 #3
0
        private void Build()
        {
            Resizable = false;

            VBox.WidthRequest = 400;
            VBox.BorderWidth  = 6;
            VBox.Spacing      = 6;

            red_spinbox       = new HScaleSpinButtonWidget();
            red_spinbox.Label = Catalog.GetString("Red");
            InitSpinBox(red_spinbox);

            green_spinbox       = new HScaleSpinButtonWidget();
            green_spinbox.Label = Catalog.GetString("Green");
            InitSpinBox(green_spinbox);

            blue_spinbox       = new HScaleSpinButtonWidget();
            blue_spinbox.Label = Catalog.GetString("Blue");
            InitSpinBox(blue_spinbox);

            link_button        = new CheckButton(Catalog.GetString("Linked"));
            link_button.Active = true;
            VBox.Add(link_button);

            AddButton(Stock.Cancel, ResponseType.Cancel);
            AddButton(Stock.Ok, ResponseType.Ok);

            DefaultWidth  = 400;
            DefaultHeight = 300;
            ShowAll();
        }