RepositoryItemTimeSpanEdit Class

Represents a repository item that stores settings specific to the TimeSpanEdit control.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v20.2.dll

Declaration

public class RepositoryItemTimeSpanEdit :
    RepositoryItemTimeEdit

The following members accept/return RepositoryItemTimeSpanEdit objects:

Remarks

A RepositoryItemTimeSpanEdit object represents a repository item that stores a TimeSpanEdit control's settings. You can use the repository item to assign the editor to a column in a data-aware control, to display the editor in a ribbon, etc. For a stand-alone editor, use the TimeSpanEdit.Properties property to access these settings.

Edit Style

The TimeEditStyle property specifies how users modify the time span:

  • SpinButtons — spin buttons that are placed vertically one under another.

    To enable a horizontal spin button layout, use the SpinStyle property.

  • TouchUI — a touch drop-down panel with tiles.

    The drop-down panel supports both: the mouse and the keyboard.

NOTE

The TimeSpanEdit control always uses spin buttons if a time-span input mask is applied (the TimeSpanEdit.Properties.Mask.MaskType property is set to TimeSpan or TimeSpanAdvancingCaret).

Input Restrictions

The editor allows users to edit hours, minutes, and seconds in the edit box.

The actual format depends or the current culture settings (see LongTimePattern). Use the Mask property to customize the input mask. The editor supports mask specifiers for days ('d'), hours ('H'), minutes ('m'), seconds ('s'), and second fractions ('f'). See the examples below.

using DevExpress.XtraEditors.Mask;

timeSpanEdit1.Properties.Mask.MaskType = MaskType.DateTime;
timeSpanEdit1.Properties.EditMask = "d.HH.mm.ss";
// Enables editing milliseconds in the drop-down panel.
timeSpanEdit1.Properties.AllowEditMilliseconds = true;
timeSpanEdit1.Properties.EditMask = "HH-mm-ss-fff";
timeSpanEdit1.Properties.EditMask = "d/HH/mm/ss/fff";

The default drop-down panel allows users to edit days, hours, minutes, and seconds.

Tiles in the drop-down panel do not depend on the input mask. Use the following properties to show/hide specific tiles in the drop-down panel:

The following properties allow you to specify extreme values that the user can enter in the text box and drop-down panel:

NOTE

These properties are not in effect if the editor uses a time-span input mask (the TimeSpanEdit.Properties.Mask.MaskType property is set to TimeSpan or TimeSpanAdvancingCaret).

See Also