TdxRangeControlCustomDateTimeClientProperties.PrimaryScale Property
Specifies the primary scale on the range control‘s ruler provided by the date/time header client.
Declaration
property PrimaryScale: TdxRangeControlDateTimeScale read; write;
Property Value
Type |
---|
TdxRangeControlDateTimeScale |
Remarks
The primary scale determines the measurement unit corresponding to the minimum date/time range that can be selected by using a range control integrated with the date/time header client. To change the current primary scale on the range control’s ruler, you can assign one of the scales supported by the client to the PrimaryScale property:
Value | Scale’s Measurement Unit | Synchronized with the Property Value |
---|---|---|
Scales.Day | rcduDay | Scales.Day.Active |
Scales.Hour | rcduHour | Scales.Hour.Active |
Scales.Minute | rcduMinute | Scales.Minute.Active |
Scales.Month | rcduMonth | Scales.Month.Active |
Scales.Quarter | rcduQuarter | Scales.Quarter.Active |
Scales.Week | rcduWeek | Scales.Week.Active |
Scales.Year | rcduYear | Scales.Year.Active |
The following code example sets the minimal selectable date/time range to one hour. Note that the primary scale does not become visible automatically.
var
ADateTimeHeaderProperties: TdxRangeControlDateTimeHeaderClientProperties;
//...
ADateTimeHeaderProperties := dxRangeControl1.ClientProperties as TdxRangeControlDateTimeHeaderClientProperties;
ADateTimeHeaderProperties.PrimaryScale := ADateTimeHeaderProperties.Scales.Hour;
ADateTimeHeaderProperties.PrimaryScale.Visible := True; // Display the new primary scale on the range control's ruler if the "Hour" scale is not already visible
Alternatively, you can set the corresponding synchronized property to True.
Note
To identify the minimum range that can be selected by using the range control integrated with the date/time header client, use the PrimaryScale.ScaleUnit property