This interface includes methods and properties required to maintain strings collection. You may enumerate collection items in "for..each" cycle or using indexed Items property as well as add, delete, change or insert individual lines.
|Items||0||Change selected item|
|ItemCount||1||Return items count|
|_NewEnum||-4||Return enumerator object|
|InsertItem||2||Insert item into selected position|
|DeleteItem||3||Delete selected item|
|Clear||4||Clear all items|
|AddItem||5||Add new item and return its index|
|property Items[Index]: Variant|
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 _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 InsertItem(Value, Index): VOID|
InsertItem method for collections (DMListItems and DMStrings) inserts Value in the Items array (parameterized property) at the position given by the Index parameter (0..ItemCount-1). To add element to the begin of Items array, you should pass Index=0. For DMContainer, this method inserts Values (variant array or string) in the selected Position of the Items array. For DMDigitizerContainer, this method is not implemented.
Note: for DMContainer, you should set Modified property manually after you insert container items. This will update all associated visual objects.
dim A(1) set D=Server.CreateDocument("") for I=1 to 100 A(0)=I A(1)=I^2 call D.Container.InsertItem(0, A) next D.Container.Modified=true
|function DeleteItem(Index): 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 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(Value): Long|
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
|property Text: BSTR|
For DMForms ActiveX controls (DMComboBox, DMExpressionComboBox, DMListBox, DMFloatEdit, DMSpinEdit) this property changes the text in the appropriate control.
For collection objects (DMListItems, DMStrings), this property represents the contents of the collection as a single block of text. Lines are separated by standard CRLF characters.
For DMNotes, this property also operates with the editor's data as a whole.
For DMSerie and DMLabel objects, Text is just a label.
For device driver ActiveX controls (HP4191X, B740X and E712X) this property should be used to read and write data from/to the device.