TMtxPositionPanel Class

Header: Dew.Math.Controls.VCL/MtxComCtrls.h · C++Builder only
TPanelTMtxPositionPanel

class TMtxPositionPanel : public TPanel;

Advanced progress/position bar.

The component can be used as an indicator or as a navigation help. It displays a panel within a panel which can then be dragged with the mouse. The component is also usefull as an progress indicator.

There are two key events:

  • OnChangePosition is called each time the position of the subpanel (bar) is changed.
  • OnSetPosition is called only after the user releases the mouse after the drag operation.

The slider can move within a specified range defined with SliderRange property. The minimum and maximum of that range are defined with SliderMin and SliderMax properties. The SliderPosition can take any value between SliderMin and SliderMax. The SliderSpan defines the length of the position bar within SliderRange.

Constructors

NameDescription
TMtxPositionPanel

Properties

NameTypeDescription
CancelMouseboolIf false, it is possible to drag the slider with the mouse.
OnChangePositionTNotifyEventTriggered each time the SliderPosition property is changed.
OnSetPositionTNotifyEventTriggered only after the user releases the mouse button after dragging the slider.
SliderBevelInnerTPanelBevelSpecifies the formating of the slider.
SliderBevelOuterTPanelBevelSpecifies the formating of the slider.
SliderBevelWidthTBevelWidthSpecifies the formating of the slider.
SliderColorTColorDefines the color of the slider.
SliderMaxdoubleDefines the maximum for definition range within which the slider can move.
SliderMindoubleDefines the minimum for definition range within which the slider can move.
SliderPositiondoubleDefines the position of the left most edge of the slider.
SliderRangedoubleDefines the range of the slider.
SliderSpandoubleSpecifies the span of the slider.
SliderSpanMinintMinimum slider tolerance.

Methods

NameDescription
GetCancelMouse
GetOnChangePosition
GetOnSetPosition
GetSliderBevelInner
GetSliderBevelOuter
GetSliderBevelWidth
GetSliderColor
GetSliderMax
GetSliderMin
GetSliderPosition
GetSliderRange
GetSliderSpan
GetSliderSpanMin
MouseDown
MouseMove
MouseUp
Paint
SliderResetSets all slider properties to 0.

Fields

NameTypeDescription
SavedMousePosdouble
SavedSliderPosdouble