setCtlTicFreq

Syntax

int setCtlTicFreq(int n, int m)

Arguments

n
The index of the trackbar control to change.
m
The interval between tick marks.

Return

Returns true / 1 if the function succeed. Returns -1 if the control number is out of range or not in use. Returns false if the control is not a TRACKBAR or SLIDER control.

Description

Sets the frequency with which tick marks are displayed for slider control n. For example, if the frequency is set to 2, a tick mark is displayed for every other increment in the slider’s range. The default setting for the frequency is 1 (that is, every increment in the range is associated with a tick mark).

Comments

The SLIDER or TRACKBAR must have the AUTOTICKS style set for this function to work.

Example

%fml
ctl[0]: TRACKBAR(AUTOTICKS), Range=(0,100)

OnFilterStart: {
  // Set a tick mark at 20, 40, 60 etc.
  setCtlTicFreq(0, 20);
  return true;
}

See Also

TRACKBAR, setCtlVal