Skip to main content

TimeEdit.CloseUp Event

Allows you to accept or discard the modified TimeEdit control’s value after the pop-up window is closed.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[Browsable(true)]
[DXCategory("Events")]
[EditorBrowsable(EditorBrowsableState.Always)]
public override event CloseUpEventHandler CloseUp

Event Data

The CloseUp event's data class is CloseUpEventArgs. The following properties provide information specific to this event:

Property Description
AcceptValue Gets or sets a value indicating whether CloseUpEventArgs.Value should be accepted or discarded.
CloseMode Gets a value indicating how the popup editor’s dropdown window was closed.
PressedButton Returns which popup button has been pressed by an end-user.
Value Gets or sets a value to assign to the editor’s edit value.

Remarks

If the RepositoryItemTimeEdit.TimeEditStyle property equals TimeEditStyle.TouchUI, clicking the TimeEdit‘s action button invokes a touch-friendly pop-up window. This fires the TimeEdit.QueryPopUp and TimeEdit.Popup events.

When the TimeEdit control’s pop-up window is to be closed, the TimeEdit.QueryCloseUp event occurs. Handle it to allow or prohibit closing the pop-up window. Next, the CloseUp event fires. This event’s parameters allow you to change the value the user submitted and to specify whether to accept or discard the value.

Initially, the CloseUpEventArgs.AcceptValue parameter indicates whether the modifications performed within the popup window are about to be saved or discarded. The parameter’s initial value is false in the following cases:

  • the user has pressed the ESC key;
  • the TimeEdit.CancelPopup method has been called;
  • the popup window’s ‘Cancel’ button has been clicked.

When closing the popup window using other methods, the CloseUpEventArgs.AcceptValue parameter value is initially true, and modifications are about to be accepted. If you need to override the default behavior, change the parameter value. If you need to modify the value before it is accepted, modify the CloseUpEventArgs.Value parameter.

Eventually, the TimeEdit.Closed event occurs, which allows you to get how the pop-up window was closed.

See Also