Download Now

    Reference TSlider

    Declared in Codebot.Render.Widgets.pas on line 826

    TSlider chooses a position between Min and Max by dragging its grip
      TSlider = class(TWidget)
      protected
        procedure Track(X: Float);
        procedure Change; override;
        procedure DoMouseDown(var Args: TSceneMouseArgs); override;
        procedure DoMouseMove(var Args: TSceneMouseArgs); override;
      public
        constructor Create(Parent: TWidget; const Name: string = ''); override;
        { A label which shows the position of the slider using its AssociateText }
        property Associate: TLabel read FAssociate write SetAssociate;
        { The rectangle of the grip }
        property GripRect: TRectF read GetGripRect;
        { The lowest position }
        property Min: Float read FMin write SetMin;
        { The highest position }
        property Max: Float read FMax write SetMax;
        { The position of the grip }
        property Position: Float read FPosition write SetPosition;
        { The step between positions }
        property Step: Float read FStep write SetStep;
        property OnChange;
        property OnClick;
        property OnKeyDown;
        property OnMouseDown;
        property OnMouseMove;
        property OnMouseUp;
      end;

    See also

    Float in Codebot.System.pas
    TRectF in Codebot.Graphics.Types.pas
    TSceneMouseArgs in Codebot.Render.Scenes.pas