CalendarKeyBehavior

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

The CalendarKeyBehavior carries out one of a Calendar's keys: moving the current day by a day, a week, a month or a year, to the start or end of its week, choosing it, or closing a date field's calendar. Which one is set with Setup, using the constants here. The moves work only while the calendar itself has the focus, not one of its month buttons.

Example Code

use Libraries.Interface.Behaviors.Controls.CalendarKeyBehavior

CalendarKeyBehavior behavior
behavior:Setup(behavior:NEXT_DAY)

Variables

  • integer WEEK_START
  • integer NEXT_YEAR
  • integer CLOSE
  • integer PREVIOUS_WEEK
  • integer PREVIOUS_DAY
  • integer PREVIOUS_MONTH
  • integer NEXT_WEEK
  • integer WEEK_END
  • integer PREVIOUS_YEAR
  • integer NEXT_DAY
  • integer CHOOSE
  • integer NEXT_MONTH

Actions

GetMove()

This action returns what the key does, one of the constants.

Returns

integer: What the key does.

Example

use Libraries.Interface.Behaviors.Controls.CalendarKeyBehavior

CalendarKeyBehavior behavior
integer value = behavior:GetMove()

IsFinished()

This action returns true: the key's work is done at once.

Returns

boolean: true.

Run(Libraries.Interface.Events.BehaviorEvent event)

This action carries out the key on the calendar. The input tables call it, so most users won't need to.

Parameters

Setup(integer newMove)

This action sets what the key does.

Parameters

  • newMove integer: One of the constants, such as NEXT_DAY.

Example

use Libraries.Interface.Behaviors.Controls.CalendarKeyBehavior

CalendarKeyBehavior behavior
behavior:Setup(behavior:CHOOSE)

Inherited Actions

6 actions from Libraries.Interface.Behaviors.Behavior
3 actions from Libraries.Language.Object