This interface provides access to the collection (dynamic array) of plot label objects. You may create, delete, enumerate and reorder labels using methods and properties of this collection. In addition, IDMLabels interface has SelectedItem property that returns reference to the selected label object.
|Items||0||Changes selected label|
|ItemCount||1||Returns number of labels|
|SelectedItem||2||Returns selected label (if any)|
|_NewEnum||-4||Returns enumerator object|
|Clear||3||Clears all labels|
|AddItem||4||Returns new label object|
|SendToBack||6||Makes the label beneath others|
|BringToFront||7||Makes the label topmost|
|r/o property Items[Index]: IDispatch|
For DMINIFile, Items return either collection of INI file sections (if no section was defined in the Open method) OR the collection of names of records in the selected section. Use Value() property to access section contents (or Value) of the selected record. For DMRegistry, Items return the collection of names of the records (values) under the selected registry key.
Items collection filled in the Open method and is read-only. Don't try to change it anyway. Use Value() property to change values.
For DMComboBox, DMExpressionComboBox and DMListBox, Items represent a read/write collection of strings in the appropriate control.
For DMContainer and DMDigitizerContainer, Items is a parameterized property - an array of data items ("for each" cycle still can be performed on the object itself). Each data item is a variant array of double-precision numbers. Notice that for DMDigitizerContainer, you can only read Items. For DMContainer, you may assign either variant array OR just a properly formatted string to the Items() property.
For DMListItems and DMStrings, Items is a parameterized property that returns (or changes) a string selected by Index parameter (0..ItemCount-1).
For DMLabels collection, this is a default, parameterized (0..ItemCount-1) property that returns references to the DMLabel objects.
|r/o property ItemCount: Long|
ItemCount property returns number of elements in the Items parameterized property. Items are indexed from 0 to ItemCount-1 as shown in the example.
for I=0 to MyObject.ItemCount-1 S=MyObject.Items(I) next
|r/o property SelectedItem: IDispatch|
|r/o property _NewEnum: Unknown|
This property returns so-called Enumerator Object. Do not use it explicitly. It is used internally in the "for each [item] in [object]" cycles. Every object that has this property may be enumerated in such a cycles. This is for your convenience.
function EnumDocuments dim S S="" for each Doc in Server S=S & Doc.WindowCaption & vbCrLf next EnumDocuments=S end function function EnumNotes dim S S="" for each Ss in Server.Notes S=S & Ss & vbCrLf next EnumNotes=S end function function EnumSeries dim S S="" for each Ser in Server.ActiveDocument.Plot S=S & Ser.Text & vbCrLf next EnumSeries=S end function function EnumItems dim S S="" for each D in Server.ActiveDocument.Container S=S & D(0) & vbCrLf next EnumItems=S end function
|function Clear: VOID|
For DMContainer and DMDigitizerContainer objects, Clear method empties the container and set Modified property to True.
For DMDigitizer, this method clears digitizer picture.
For DMListItems, DMNotes and DMStrings Clear also empties the contents of the appropriate Items (or Lines) arrays.
For HP4191X, B740X and E712X this method initialize appropriate device into some predefined state.
For DMLabels, this method deletes all plot labels.
|function AddItem: IDispatch|
AddItem method adds Value(s) element to the end of Items array (parameterized property). Note: for DMDigitizerContainer, this method is not implemented.
For DMLabels collection, it returns reference to the newly created DMLabel object.
Keep in mind that for DMContainer, you should set Modified property manually after you add container items. This will update all associated visual objects.
set D=Server.CreateDocument("") for I=1 to 100 D.Container.AddItem(I & " " & I^2) next D.Container.Modified=true
|function DeleteItem(Value): VOID|
Deletes item in in the appropriate Items array (collection or parameterized property) at the position given by the Index (or Position) parameter (0..ItemCount-1).
Note: for DMContainer, you should set Modified property manually after you delete container items. This will update all associated visual objects.
|function SendToBack(Value): VOID|
|function BringToFront(Value): VOID|