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(); }
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); }
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); }