CalendarMonthBehavior
Package: Libraries.Interface.Behaviors.Controls · Inherits from: Libraries.Language.Object, Libraries.Interface.Behaviors.Behavior
The CalendarMonthBehavior is the activation of a Calendar's previous and next month buttons: it moves the calendar's current day a number of months, so the calendar shows the month before or after.
Example Code
use Libraries.Interface.Behaviors.Controls.CalendarMonthBehavior
CalendarMonthBehavior behavior
behavior:Setup(-1)
Actions
GetMonths()
This action returns how many months the button moves.
Returns
integer: The number of months.
Example
use Libraries.Interface.Behaviors.Controls.CalendarMonthBehavior
CalendarMonthBehavior behavior
integer value = behavior:GetMonths()
IsFinished()
This action returns true: the move is done at once.
Returns
boolean: true.
Run(Libraries.Interface.Events.BehaviorEvent event)
This action moves the calendar holding the button. The button calls it when it is activated, so most users won't need to.
Parameters
eventLibraries.Interface.Events.BehaviorEvent: The activation event, whose item is the button.
Setup(integer value)
This action sets how many months the button moves: -1 for the previous month and 1 for the next.
Parameters
valueinteger: The number of months.
Example
use Libraries.Interface.Behaviors.Controls.CalendarMonthBehavior
CalendarMonthBehavior behavior
behavior:Setup(1)