Back to Devexpress

TimeEdit.CloseUp Event

windowsforms-devexpress-dot-xtraeditors-dot-timeedit-d5258895.md

latest4.4 KB
Original Source

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.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[Browsable(true)]
[DXCategory("Events")]
[EditorBrowsable(EditorBrowsableState.Always)]
public override event CloseUpEventHandler CloseUp
vb
<Browsable(True)>
<EditorBrowsable(EditorBrowsableState.Always)>
<DXCategory("Events")>
Public Overrides Event CloseUp As CloseUpEventHandler

Event Data

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

PropertyDescription
AcceptValueGets or sets a value indicating whether CloseUpEventArgs.Value should be accepted or discarded.
CloseModeGets a value indicating how the popup editor’s dropdown window was closed.
PressedButtonReturns which popup button has been pressed by an end-user.
ValueGets 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

TimeEditStyle

QueryPopUp

Popup

Closed

TimeEdit Class

TimeEdit Members

DevExpress.XtraEditors Namespace