new MarkZones(oSchedule)
The MarkZones object holds a collection of MarkZone type (mark-zone of the control). Use the MarkZones/GetMarkZones() method to access the control's mark-zones collection.
Parameters:
Name | Type | Description |
---|---|---|
oSchedule |
Schedule | Indicates an object of Schedule type that owns the collection |
Methods
Add(oMarkZoneOptsopt) → {MarkZone}
The Add() method creates and adds a new mark-zone or timer into the control. The Add() method supports one (timer or options) or two parameters (start and end margins of the mark-zone), as shown in the example.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
oMarkZoneOpts |
object |
<optional> |
Specifies the options to create the new mark-zone as an object of MarkZoneOptions type |
Returns:
Returns the newly created mark-zone, as an object of MarkZone type
- Type
- MarkZone
Example
oSchedule.MarkZones.Add("#1/1/2002 8:30#").Shape = "black", (one parameter) adds a new timer at 8:30 AM, on Jan 1st, 2002
oSchedule.MarkZones.Add({start: "#1/1/2001 10:00#", start: "#1/1/2001 13:00#"}), (one parameter) adds a new mark-zone from 10:00 AM to 1:00 PM on Jan 1st, 2001
oSchedule.MarkZones.Add("#1/1/2001 10:00#", "#1/1/2001 13:00#"), (two-parameters) adds a new mark-zone from 10:00 AM to 1:00 PM on Jan 1st, 2001
Add
Clear()
The Clear() method removes all mark-zones of the control and inits the control's scroll-bars
GetCount() → {number}
The GetCount() method returns the number of mark-zones within the collection
Returns:
Returns the number of mark-zones within the collection
- Type
- number
Example
The following statements are equivalents:
oSchedule.MarkZone.GetCount(), counts the mark-zones within the control
oSchedule.MarkZone.Count, counts the mark-zones within the control
where oSchedule is an object of Schedule type
GetCount
Item(id) → {null|MarkZone}
The Item() method gets the mark-zone giving its index, identifier/key or reference. The MarkZone(id) method returns the mark-zone based on its index or identifier/key (equivalent of this method)
Parameters:
Name | Type | Description |
---|---|---|
id |
any | The id parameter could be any of the following:
|
Returns:
Returns null if the mark-zone is not found, or an object of MarkZone type, if the mark-zones collection contains the giving id.
- Type
- null | MarkZone
Remove(id)
The Remove() method removes a mark-zone from the collection.
Parameters:
Name | Type | Description |
---|---|---|
id |
any | The id parameter could be any of the following:
|
RemoveRange(range) → {number}
The RemoveRange() method removes multiple-mark-zones at once
Parameters:
Name | Type | Description |
---|---|---|
range |
any | Indicates a mark-zone, an array [{MarkZone}], or an exontrol.Arr([{MarkZone}]) |
Returns:
Returns the number of mark-zones being deleted
- Type
- number