Value: Integer;
Value: Integer;
The Value property determines the value set in a control.
This value should be within [Minimum; Maximum] range.
Executing the example requires a form, a button named Button1 positioned on it and the Ribbon component named Ribbon1. A tab and a panel are created on the ribbon of the Ribbon1 component.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
RPanel: IRibbonPanel;
RSlider: IRibbonSlider;
Begin
RPanel := Ribbon1.ActiveCategory.Panels.Item(0);
RSlider := New RibbonSlider.Create;
RPanel.Elements.Add(RSlider);
RSlider.InnerWidth := 200;
RSlider.Minimum := 0;
RSlider.Maximum := 100;
RSlider.Orientation := RibbonElementOrientation.Horizontal;
RSlider.Value := 10;
RSlider.VisibleButtons := True;
End Sub Button1OnClick;
On clicking the button a slider is created on the ribbon panel. The following parameters will be defined for the slider: the current value, the minimum and maximum values, control length in pixels and control orientation.
See also: