Ejemplo n.º 1
0
        public ToolBarSlider(int min, int max, int step, int value)
        {
            hscale = new HScale(min, max, step);
            hscale.WidthRequest = 150;
            hscale.Value        = value;
            hscale.ValuePos     = PositionType.Left;

            hscale.Show();

            Add(hscale);
            Show();
        }
Ejemplo n.º 2
0
        private Widget CreateBottomBar()
        {
            HButtonBox buttonBox = new HButtonBox();

            buttonBox.Layout = ButtonBoxStyle.Edge;

            toggleSidebarButton          = new Button();
            toggleSidebarButton.Label    = Catalog.GetString("Close Sidebar");
            toggleSidebarButton.Relief   = ReliefStyle.None;
            toggleSidebarButton.Clicked += OnToggleSidebarButtonClicked;
            toggleSidebarButton.Show();
            buttonBox.PackStart(toggleSidebarButton, false, false, 0);

            personHScale               = new HScale(1, 3, 1);
            personHScale.DrawValue     = false;
            personHScale.ValueChanged += OnPersonHScaledValueChanged;
            personHScale.Show();
            buttonBox.PackEnd(personHScale, false, false, 0);

            buttonBox.Show();
            return(buttonBox);
        }
Ejemplo n.º 3
0
        static HScale PutScale(string name, Fixed fixd, ref int offset)
        {
            Label lbl = new Label();

            lbl.Name = "lbl";
            lbl.Text = name;

            fixd.Put(lbl, 0, offset);
            lbl.Show();
            offset += 20;

            HScale scale = new HScale(0, 1, 0.1);

            scale.WidthRequest = 180;
            scale.Name         = "scale";

            fixd.Put(scale, 0, offset);
            scale.Show();
            offset += 40;

            return(scale);
        }