Back to Devexpress

TdxRangeControlDateTimeClientProperties.Scale Property

vcl-dxrangecontrol-dot-tdxrangecontroldatetimeclientproperties.md

latest3.4 KB
Original Source

TdxRangeControlDateTimeClientProperties.Scale Property

Specifies the scale displayed by the range control‘s ruler provided by the date/time client.

Declaration

delphi
property Scale: TdxRangeControlDateTimeScale read; write;

Property Value

Type
TdxRangeControlDateTimeScale

Remarks

This property specifies the measurement unit corresponding to the minimum date/time range that can be selected by using a range control integrated with the date/time client. To change the scale displayed on the range control’s ruler, you can assign one of the scales supported by the client to the Scale property:

ValueScale’s Measurement UnitSynchronized with the Property Value
Scales.DayrcduDayScales.Day.Active
Scales.HourrcduHourScales.Hour.Active
Scales.MinutercduMinuteScales.Minute.Active
Scales.MonthrcduMonthScales.Month.Active
Scales.QuarterrcduQuarterScales.Quarter.Active
Scales.WeekrcduWeekScales.Week.Active
Scales.YearrcduYearScales.Year.Active

The following code example sets the minimum selectable date/time range to one month:

delphi
var
  ADateTimeProperties: TdxRangeControlDateTimeClientProperties;
//...
  ADateTimeHeaderProperties := dxRangeControl1.ClientProperties as TdxRangeControlDateTimeClientProperties;
  ADateTimeProperties.Scale := ADateTimeProperties.Scales.Hour;
cpp
TdxRangeControlDateTimeClientProperties *ADateTimeProperties;
//...
  ADateTimeProperties = dynamic_cast<TdxRangeControlDateTimeClientProperties*>(dxRangeControl1->ClientProperties);
  ADateTimeProperties->Scale = ADateTimeProperties->Scales->Hour;

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 client, use the Scale.ScaleUnit property.

See Also

TdxRangeControlDateTimeClientProperties Class

TdxRangeControlDateTimeClientProperties Members

dxRangeControl Unit