ObjectDCL Banner

Month_SetRange Method

Description

This method will set the lowest and highest allowable dates.

Parameters

MyControlReference
Reference to the control in the form of MyProject_MyForm_MyControl.
ProjectFile
String identifying the project as it was passed in LoadProject.
DialogName
String identifying the dialog by name.
ControlName
String identifying the control by name.
LowestDateYear
Integer identifying the year of the lowest date.
LowestDateMonth
Integer identifying the month of the lowest date.
LowestDateDay
Integer identifying the day of the lowest date.
HighestDateYear
Integer identifying the year of the highest date.
HighestDateMonth
Integer identifying the month of the highest date.
HighestDateDay
Integer identifying the day of the highest date.

Return Values

Returns the following according to the situation:

  • T when successful.
  • Nil if the control is not found, is not visible or the date range is invalid.

AutoLISP Syntax

The recommended convention is passing the control identifier directly:

CopyCode imageCopy Code
(Odcl_Month_SetRange 
		MyControlReference [as Reference]
		(list
			LowestDateYear [as Integer]
			LowestDateMonth [as Integer]
			LowestDateDay [as Integer])
		(list
			HighestDateYear [as Integer]
			HighestDateMonth [as Integer]
			HighestDateDay [as Integer]))

An alternative convention is to identify the control by providing the project file, the dialog name and the control name:

CopyCode imageCopy Code
(Odcl_Month_SetRange
		ProjectFile [as String]
		DialogName [as String]
		ControlName [as String]
		(list
			LowestDateYear [as Integer]
			LowestDateMonth [as Integer]
			LowestDateDay [as Integer])
		(list
			HighestDateYear [as Integer]
			HighestDateMonth [as Integer]
			HighestDateDay [as Integer]))

Applies For

MonthPicker.

Example

CopyCode imageCopy Code
; Set the allowable range
(Odcl_Month_SetRange MyProject_MyForm_MyControl (list 2009 01 01) (list 2009 12 31))

See Also

Month_GetRangeEnd, Month_GetRangeStart