DateFieldPopupListener

Package: Libraries.Interface.Behaviors.Controls · Inherits from: Libraries.Interface.Events.MouseListener, Libraries.Language.Object

The DateFieldPopupListener closes a DateField's calendar when the user clicks outside it. The field adds it to the calendar's layer while the calendar is open. A click on the field itself is left to the field, so its "Choose date" button can close the calendar without opening it again.

Example Code

use Libraries.Interface.Behaviors.Controls.DateFieldPopupListener
use Libraries.Interface.Controls.DateField

DateField field
DateFieldPopupListener listener
listener:SetDateField(field)

Actions

ClickedMouse(Libraries.Interface.Events.MouseEvent event)

This action closes the calendar when a mouse button goes down outside it, on the field and its button too. The click still goes on to whatever is under it.

Parameters

GetDateField()

This action returns the date field whose calendar this listener closes.

Returns

Libraries.Interface.Controls.DateField: The date field.

Example

use Libraries.Interface.Behaviors.Controls.DateFieldPopupListener
use Libraries.Interface.Controls.DateField

DateFieldPopupListener listener
DateField field = listener:GetDateField()

SetDateField(Libraries.Interface.Controls.DateField value)

This action sets the date field whose calendar this listener closes.

Parameters

Example

use Libraries.Interface.Behaviors.Controls.DateFieldPopupListener
use Libraries.Interface.Controls.DateField

DateField field
DateFieldPopupListener listener
listener:SetDateField(field)

Inherited Actions

1 action from Libraries.Interface.Events.MouseListener
3 actions from Libraries.Language.Object