FMX.StdCtrls.TTrack.Frequency

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Frequency;

C++

__property Frequency;

Properties

Type Visibility Source Unit Parent
property published
FMX.StdCtrls.pas
FMX.StdCtrls.hpp
FMX.StdCtrls TTrack

Description

Specifies the number of positions the slider advances with each move.

FMX.StdCtrls.TTrack.Frequency inherits from FMX.StdCtrls.TCustomTrack.Frequency. All content below this line refers to FMX.StdCtrls.TCustomTrack.Frequency.

Specifies the number of positions the slider advances with each move.

Use the Frequency property to specify how many steps at once the slider advances with each move. For instance, if you set Frequency to 10, Min to 0, and Max to 100, then there are only 10 steps for this slider to move within the 0 to 100 range; Value is incremented or decremented with 10 divisions.

Frequency is a floating-point Single value; setting Frequency to 0 enables this track bar to increment or decrement by 0.01 divisions by step. Setting Frequency to any integer value (for instance 1, or 5, and so on) will enable this track bar to increment or decrement by the specified value.

However, please take into consideration that if you set Frequency to any value greater than 0 and you try to programmatically assign a value to Value, then your value will be converted to the nearest multiple of Frequency.

For instance, setting Frequency to 5 and then attempting to programmatically set Value to 12 will actually set Value to 10.

  MyTrackBar.Frequency := 5;
  MyTrackBar.Value := 12; { actually sets Value to 10 }
  MyTrackBar->Frequency = 5;
  MyTrackBar->Value = 12; /* actually sets Value to 10 */

See Also