TdxRangeControlDateTimeAutoFormatHelper Class
The class implementing the automatic scale formatting functionality for the Date/Time Header-based data range models.
Declaration
TdxRangeControlDateTimeAutoFormatHelper = class(
TObject
)
Remarks
Scale header labels displayed by the range control employing the Date/Time Header or Scheduler data range selection and visualization model, are formatted differently, depending on the current header sizes. The scale header formatting can dynamically change in response to zooming the selectable range in or out, either by using the Zoom&Scroll bar or programmatically. For instance, there are four possible ways to format day header labels, depending on the current size of a day scale header:
The TdxRangeControlDateTimeAutoFormatHelper class implements the following class functions that can be used to:
Format a date/time value for displaying in the corresponding scale header (FormatDay, FormatHour, FormatMonth, FormatMinute, FormatQuarter, FormatSecond, FormatWeek, and FormatYear);
Identify the number of available date/time header formats for a scale graduated in the specified measurement units (GetFormatCount).
To provide the custom automatic formatting functionality for date/time scale headers, you need to do the following:
Override the required class functions from the aforementioned TdxRangeControlDateTimeAutoFormatHelper descendant;
Specify a class-reference to the derived class as the Date/Time Header data range model’s AutoFormatHelper property value.
A TdxRangeControlDateTimeAutoFormatHelper object is referenced by the TdxRangeControlDateTimeAutoFormatHelperClass type.