CustomTrack¶
Qualified name: delphifmx.CustomTrack
- class CustomTrack¶
Bases:
StyledControlBase class for all track bar components. TCustomTrack is the base class for all track bar components such as TTrackBar. If you need to create your own custom track bar, then you should derive your component from TCustomTrack, as it already implements functionality for drawing and manipulating the track bar.
Methods
Responds after the last constructor has executed and loads the control presentation.
TStyledControl.ApplyStyleLookup() Gets and applies the style of a TStyledControl.
TPresentedControl.ApplyTriggerEffect(AInstance: FmxObject, ATrigger: str) -> None Applies the specified mouse trigger effect to all the children of this FMX object that are of type TEffect.
Performs any necessary actions before the first destructor is called.
TPresentedControl.FindStyleResource(AStyleLookup: str, AClone: bool) -> FmxObject Finds the linked resource object for the style specified by name.
TPresentedControl.HasPresentationProxy() -> Boolean
TStyledControl.Inflate() Call this procedure to get and apply its style lookup.
TPresentedControl.LoadPresentation()
TStyledControl.NeedStyleLookup() Call this procedure to indicate that this control requires to get and apply its style lookup.
TPresentedControl.PointInObjectLocal(X: float, Y: float) -> bool Checks whether the point specified by local coordinates belongs to the control area.
Forces the current control to recalculate its enabled state.
Forces the current control to recalculate its Opacity property.
TPresentedControl.ReloadPresentation()
TPresentedControl.StartTriggerAnimation(AInstance: FmxObject, ATrigger: str) -> None Embarcadero Technologies does not currently have any additional information.
TPresentedControl.StartTriggerAnimationWait(AInstance: FmxObject, ATrigger: str) -> None Embarcadero Technologies does not currently have any additional information.
TPresentedControl.UnloadPresentation()
Attributes
AbsoluteClipRectSpecifies the absolute rectangle of the control after all its parent controls clip it.
AbsoluteEnabledSpecifies whether the control is absolutely enabled.
AbsoluteHeightSpecifies the absolute height of the control.
AbsoluteMatrixSpecifies the absolute transformation matrix of the control.
AbsoluteOpacitySpecifies the absolute opacity of the control.
AbsoluteRectSpecifies the absolute rectangle that bounds the control.
AbsoluteScaleSpecifies the absolute scale of the control.
AbsoluteWidthSpecifies the absolute width of the control.
ActionClientSpecifies whether the component object has an associated action.
Updates the width and height of this control according to its current style
Determines if and how the width and height of this control should be modified to take the fixed space dictated by the style of this control
AlignSpecifies the alignment options (top, left, client, and so on) of this control.
AnchorsSpecifies how the control is anchored to its parent.
ApplyingEffectA flag that signals when a control is in the process of applying an effect.
AutoCaptureSpecifies whether the control captures mouse events.
Specifies whether the control's text should be translated
AxisAlignedRectA TRectF defined by the width and height of the control.
BoundsRectSpecifies the bounding rectangle of the control.
CanParentFocusSpecifies whether the parent of this control should be evaluated to receive focus.
CanvasProvides the drawing surface of the control.
ChildrenStores an array of children attached to this parent component.
ChildrenCountRead-only property that specifies the number of children in the children list.
ChildrenRectSpecifies the bigger rectangle area occupied by parent and children controls.
ClassNameReturns the TObject.ClassName
ClipChildrenSpecifies if children of the control should be clipped to the control's on-screen region.
ClipParentSpecifies whether the current control has clipped its parent.
ClipRectSpecifies the bound rectangle to be clipped.
ComObjectSpecifies the interface reference implemented by the component.
ComponentCountReturns the owned component count
ComponentIndexIndicates the position of the component in its owner's Components property array.
ComponentStateDescribes the current state of the component, indicating when a component needs to avoid certain actions.
ComponentStyleGoverns the behavior of the component.
ComponentsReturns an iterator over the owned components
ControlType:
ControlsReturns an iterator over contained controls
ControlsCountReturns the count of contained controls
CursorImage to use to represent the mouse pointer when it passes into the region covered by the control.
DataStores a Tvalue, which is a data structure that can store different kinds of data types.
DefaultSizeEmbarcadero Technologies does not currently have any additional information.
Returns a string with the name of the default style of this control
DesignInfoContains information used by the Form designer.
DisableDisappearEmbarcadero Technologies does not currently have any additional information.
DisableFocusEffectSpecifies whether the control has the focus effect disabled.
DragModeSpecifies how the control initiates drag-and-drop operations.
EnableDragHighlightSpecifies whether the control is highlighted when the dragged object is over it.
EnabledSpecifies whether the control responds to mouse, keyboard, and timer events.
FixedSizeEmbarcadero Technologies does not currently have any additional information.
Specifies the number of positions the slider advances with each move.
HasAfterPaintEffectSpecifies whether the control has an effect that is applied after the control is painted.
HasClipParentControl that is a direct child of this control and has clipped this control.
HasDisablePaintEffectSpecifies whether the control's effect is painted.
HasEffectSpecifies whether the control has an applied effect.
HeightHeight specifies the vertical size of the control (in dp).
HelpContextContains the numeric context ID that identifies the Help topic for the control.
HelpKeywordContains the keyword string that identifies the Help topic for the control.
HelpTypeSpecifies whether the control's context-sensitive Help topic is identified by a context ID or by keyword.
HintSpecifies the text string that appears when the user moves the mouse over a control.
HitTestEnables the control to capture mouse events.
InPaintToSpecifies whether the control is currently being painted.
IndexSpecifies the index of the child object in the children array attached to this object.
InheritedCursorImage used to represent the mouse pointer when it passes into the region covered by the control.
InvertAbsoluteMatrixSpecifies the inverse matrix of AbsoluteMatrix.
IsDragOverSpecifies whether a dragged object is over the area of the current control.
IsFocusedDetermines whether the control has input focus.
IsInflatedWhether the current style of this control has been actually applied to the control.
IsMouseOverSpecifies whether the mouse cursor is over the control.
Indicates whether the Thumb that is associated with this TCustomTrack is pressed.
IsVisibleSpecifies whether the control is visible.
LocalRectSpecifies the local rectangle for painting the control.
LockedSpecifies whether the control is locked at design time.
MarginsAligns the component to the margins points of other components.
Specifies the maximum value of this track bar for the maximum position of the slider.
Specifies the minimum value of this track bar, for the minimum position of the slider.
DataModel:
NameSpecifies the name of the component as referenced in code.
ObserversIndicates the TObservers object added to the TComponent.
OnGestureCallable[[Object, GestureEventInfo, bool], None]:
OpacitySpecifies the control opacity.
Specifies the orientation of this track bar (from left to right or from bottom to top).
OwnerReturns the Component Owner
PaddingAligns the component to the padding points of other components.
ParentReturns/Sets the Control Visibility
ParentClassStyleLookupNameThe name of the default style of the parent class of this control.
ParentControlSpecifies the parent control of this control.
ParentedRectSpecifies the bounding rectangle of the control within its parent.
ParentedVisibleSpecifies whether all the control's parents are visible.
PopupMenuSpecifies the context (pop-up) menu object.
PositionReturns an access to the position of the control inside its parent
Object:
PresentationProxy:
PresentationState:
PressedIndicates whether the control is currently pressed.
PressedPositionA point that indicates where exactly on the control the click occured.
RootSpecifies the root parent of this object.
SceneSpecifies the current scene in which the control is drawn.
ShowHintSpecifies whether the Hint can be shown.
SizeSpecifies the vertical and horizontal size (Size.Height and Size.Width) of the control (in pixels).
Controls the number of positions that the Thumb of the TCustomTrack moves each time the user presses on a free area.
StoredSpecifies whether this object is stored in the .XFM file.
Specifies the name of the resource object to which the current TStyledControl is linked
StyleNameSpecifies the style name for this FMX component.
This property allows you to define the current state of style
StylesDataValue:
TabOrderIndicates the position of the control in its parent's tab order.
TabStopEmbarcadero Technologies does not currently have any additional information.
TagStores a NativeInt integral value as a part of a component.
TagFloatCustom property that stores any floating-point value.
TagObjectCustom property that stores any object value.
TagStringCustom property that stores any string value.
The part of a track bar that you move to change the value of the track bar.
TouchSpecifies the touch manager component associated with the control.
TouchTargetExpansionSet of optional pixel values you can specify to expand the touch target of a FireMonkey styled control.
Indicates whether thumb tracking is active or not.
UpdateRectSpecifies the rectangle area of the control that needs to be updated.
VCLComObjectRepresents information used internally by components that support COM.
Specifies the current value of this track bar.
Provides access to the Value value, to its Min and Max boundaries, and to the Frequency and ViewportSize properties.
Specifies the size, in pixels, of the area that the slider cannot span to the left or right of this track bar.
VisibleReturns/Sets the Control Visibility
WidthSpecifies the horizontal size of the control (in pixels).
- AdjustSizeValue¶
Updates the width and height of this control according to its current style
- AdjustType¶
Determines if and how the width and height of this control should be modified to take the fixed space dictated by the style of this control
- AfterConstruction()¶
Responds after the last constructor has executed and loads the control presentation. FMX.StdCtrls.TCustomTrack.AfterConstruction inherits from FMX.Controls.Presentation.TPresentedControl.AfterConstruction. All content below this line refers to FMX.Controls.Presentation.TPresentedControl.AfterConstruction. Responds after the last constructor has executed and loads the control presentation. AfterConstruction is called automatically after the object’s last constructor has executed. Do not call it explicitly in your applications.
- ApplyStyleLookup()¶
Gets and applies the style of a TStyledControl.
- ApplyTriggerEffect(AInstance: FmxObject, ATrigger: str) None¶
Applies the specified mouse trigger effect to all the children of this FMX object that are of type TEffect. ApplyTriggerEffect iterates through all the children of this FMX object and, if one of them is of type TEffect, applies the mouse trigger given through the ATrigger parameter (which can be ‘IsMouseOver’, ‘IsMouseOver’, ‘IsDragOver’, and so on). AInstance specifies the instance of the FMX object to which the trigger effect is applied.
- AutoTranslate¶
Specifies whether the control’s text should be translated
- BeforeDestruction()¶
Performs any necessary actions before the first destructor is called. FMX.Controls.TStyledControl.BeforeDestruction inherits from System.Classes.TComponent.BeforeDestruction. All content below this line refers to System.Classes.TComponent.BeforeDestruction. Performs any necessary actions before the first destructor is called. BeforeDestruction is called automatically immediately before the component’s first destructor executes. Do not call it explicitly in your applications. As implemented in TComponent, BeforeDestruction checks whether the Destroying method has been called, and if not, calls it. Descendants that override this method to perform other actions before a component is destroyed should call the inherited method first to ensure that this check takes place.
- ControlType¶
ControlType:
- DefaultStyleLookupName¶
Returns a string with the name of the default style of this control
- FindStyleResource(AStyleLookup: str, AClone: bool) FmxObject¶
Finds the linked resource object for the style specified by name. The AStyleLookup parameter specifies the name of the style. If AStyleLookup is empty, FindStyleResource returns nil. If no resource object is linked directly to the control, FindStyleResource looks to the styles of the control’s children. If no resource object is found, it returns nil. Clone determines whether the returned style resource object should be the original style object (False) or a copy of the original (True). Finds the linked resource object for the style specified by name. The AStyleLookup parameter specifies the name of the style. If AStyleLookup is empty, FindStyleResource returns nil. If no resource object is linked directly to the control, FindStyleResource looks to the styles of the control’s children. If no resource object is found, it returns nil. Clone determines whether the returned style resource object should be the original style object (False) or a copy of the original (True).
- 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 */
- Type:
float
- HasPresentationProxy() Boolean¶
- Inflate()¶
Call this procedure to get and apply its style lookup.
- IsTracking¶
Indicates whether the Thumb that is associated with this TCustomTrack is pressed. This is a read-only property. The following table shows the value of IsTracking in some common scenarios:
Tracking
Scenario
Behaviour
Events fired
IsTracking
True or False
Press an arrow key on the keyboard.
The Thumb moves for one “step”.
OnTracking OnChange
False
True
Click on the Thumb of the track bar and move the Thumb.
The Thumb moves as much as you move it.
For each “step” of the movement:
OnTracking OnChange
True
False
Click on the Thumb of the track bar and move the Thumb.
The Thumb moves as much as you move it.
For each step of the movement:
OnTracking After you release the Thumb
OnChange
True
True
Click anywhere on the track bar (excluding the Thumb).
The Thumb moves for one “step”.
OnTracking OnChange
False
False
Click anywhere on the track bar (excluding the Thumb).
The Thumb moves to the position where you click.
OnTracking OnChange
False
True or False
Hold the Shift button and click anywhere on the track bar (excluding the Thumb).
The Thumb moves to the position where you click.
OnTracking OnChange
False
- Type:
bool
- LoadPresentation()¶
- Max¶
Specifies the maximum value of this track bar for the maximum position of the slider. Use the Max property to set a maximum value up to which the slider of this track bar can go. For instance, if Max is set to 100 (a default value), then attempting to move the slider to the maximum will result in a Value of 100.
- Type:
float
- Min¶
Specifies the minimum value of this track bar, for the minimum position of the slider. Use the Min property to set a minimum value down to which the slider of this track bar can go. For instance, if Min is set to 0 (a default value), then attempting to move the slider to the minimum will result in a Value of 0.
- Type:
float
- Model¶
DataModel:
- NeedStyleLookup()¶
Call this procedure to indicate that this control requires to get and apply its style lookup.
- Orientation¶
Specifies the orientation of this track bar (from left to right or from bottom to top). Use the Orientation property to specify how this track bar will be displayed in terms of left-to-right orientation or bottom-to-top orientation. Orientation can have one of the following values:
Value
Meaning
Vertical
The track bar is rendered with the bottom-to-top orientation.
Horizontal
The track bar is rendered with the left-to-right orientation.
- Type:
Orientation
- PointInObjectLocal(X: float, Y: float) bool¶
Checks whether the point specified by local coordinates belongs to the control area. PointInObjectLocal returns True if the specified point belongs to the control area, and False otherwise. The X and Y are the local coordinates of the point to be checked (compare with PointInObject):
X is the X coordinate. Y is the Y coordinate. The local coordinates of the upper-left corner of the control rectangle are (0,0), and the local coordinates of the lower-right corner are (Width, Height). The points of the control boundary specified by BoundsRect belong to the control and PointInObjectLocal returns True for them. If a control supports the Touch property, the control area can be optionally inflated on the values specified by the TouchTargetExpansion property. TouchTargetExpansion keeps four optional parameters representing the expansion for the four sides of the control in pixels (Bottom, Left, Right, and Top). The dclasses can change the ‘control area’ definition. For example:
The FMX.Objects.TSelection class extends the ‘control area’ definition relative to BoundsRect. FMX.Objects.TSelection.PointInObjectLocal also returns True if the point belongs to any of small rectangles of the four grip controls used to manage the selection shape. The rectangles of the grip controls are rectangles surrounding the four corners of the TSelection rectangle. The Width and Height of these rectangles are equal to 2 * GripSize. For example, the grip control’s rectangle of the upper-right corner UR_Corner of TSelection is defined by the following corners: (UR_Corner.Top - GripSize, UR_Corner.Right - GripSize)–upper-left corner of the grip. (UR_Corner.Top + GripSize, UR_Corner.Right + GripSize)–lower-right corner of the grip. FMX.Objects.TSelectionPoint.PointInObjectLocal returns True if the specified point belongs to the rectangle of the grip control corresponding to the TSelectionPoint object, and False otherwise.
- Presentation¶
Object:
- PresentationProxy¶
PresentationProxy:
- PresentationState¶
PresentationState:
- RecalcEnabled()¶
Forces the current control to recalculate its enabled state. RecalcEnabled also forces the control’s children to recalculate their enabled state.
- RecalcOpacity()¶
Forces the current control to recalculate its Opacity property. RecalcOpacity also forces the control’s children to recalculate their Opacity property.
- ReloadPresentation()¶
- SmallChange¶
Controls the number of positions that the Thumb of the TCustomTrack moves each time the user presses on a free area.
- Type:
float
- StartTriggerAnimation(AInstance: FmxObject, ATrigger: str) None¶
Embarcadero Technologies does not currently have any additional information.
- StartTriggerAnimationWait(AInstance: FmxObject, ATrigger: str) None¶
Embarcadero Technologies does not currently have any additional information.
- StyleLookup¶
Specifies the name of the resource object to which the current TStyledControl is linked
- StyleState¶
This property allows you to define the current state of style
- Thumb¶
The part of a track bar that you move to change the value of the track bar. The default appearance of the Thumb depends on the platform:
Windows: The Thumb is a rectangle. OS X: The Thumb is a circle. iOS: The Thumb is a circle. Android: The Thumb is a circle.
- Type:
- Tracking¶
Indicates whether thumb tracking is active or not. The default value of Tracking is True. The following table shows how the value of Tracking impacts the behavior of a track bar and the related events:
Tracking
Scenario
Behaviour
Events fired
IsTracking
True or False
Press an arrow key on the keyboard.
The Thumb moves for one “step”.
OnTracking OnChange
False
True
Click on the Thumb of the track bar and move the Thumb.
The Thumb moves as much as you move it.
For each “step” of the movement:
OnTracking OnChange
True
False
Click on the Thumb of the track bar and move the Thumb.
The Thumb moves as much as you move it.
For each step of the movement:
OnTracking After you release the Thumb
OnChange
True
True
Click anywhere on the track bar (excluding the Thumb).
The Thumb moves for one “step”.
OnTracking OnChange
False
False
Click anywhere on the track bar (excluding the Thumb).
The Thumb moves to the position where you click.
OnTracking OnChange
False
True or False
Hold the Shift button and click anywhere on the track bar (excluding the Thumb).
The Thumb moves to the position where you click.
OnTracking OnChange
False
- Type:
bool
- UnloadPresentation()¶
- Value¶
Specifies the current value of this track bar. Set or get Value to specify or obtain the current value of this track bar. You can set Value programmatically or visually at run time, with any value within the interval delimited by Min and Max.
- Type:
float
- ValueRange¶
Provides access to the Value value, to its Min and Max boundaries, and to the Frequency and ViewportSize properties.
- Type:
- ViewportSize¶
Specifies the size, in pixels, of the area that the slider cannot span to the left or right of this track bar. Use the ViewportSize property to specify the size of the view port of this track bar, that is, the area, in pixels, that the slider of this track bar cannot span. As an example, the picture below shows two track bars, one with ViewportSize set to 0 and the other with ViewportSize set to 50.
Tip: Changing the ViewportSize property does not affect the limits (Min or Max) or the Value of this track bar.
- Type:
float