This property refers to the list of scan devices retrieved by the List method.

[C++Builder]   imagekitcontrolname->Scan->DataSourceNameList[ = TStrings* ]
[Delphi]   imagekitcontrolname.Scan.DataSourceNameList[ = TStrings ]

Property Value

The DataSourceNameList value is the list of scan devices retrieved by the List method.

Explanation

The DataSourceNameList property refers to the list of scan devices retrieved by the List method. When the List method executes successfully, a string array containing the datasource list is set in this property and can be accessed by DataSourceNameList.Strings. The current datasource index can be accessed using the DataSourceIndex property. The number of installed datasources can be retrieved by DataSourceNameList.Count. For more information about TStrings, please refer to the Delphi or C++Builder help documentation.

The DataSourceNameList property corresponds to the Scan Control's ScanDsNameList property in earlier versions of the ImageKit.

Example Code

In C++Builder

bool Ret;
Ret = VImageKit1->Scan->List();
if (Ret == false || VImageKit1->Scan->DataSourceNameList->Count == 0) return;

ComboBox1->Items = VImageKit1->Scan->DataSourceNameList;
ComboBox1->ItemIndex = VImageKit1->Scan->DataSourceIndex;

In Delphi

Ret: Boolean;
Ret := VImageKit1.Scan.List;
if (Ret = False) or (VImageKit1.Scan.DataSourceNameList.Count = 0) then Exit;

ComboBox1.Items := VImageKit1.Scan.DataSourceNameList;
ComboBox1.ItemIndex := VImageKit1.Scan.DataSourceIndex;

Setting this value

This value cannot be set.

Retrieving this value

This value can be retrieved at runtime.

Differences with ImageKit 7/8/9/10

The DataSourceNameList property name has been changed from DsNameList.
Since the current data source is not added to the beginning of the DataSourceNameList property, use the DataSourceIndex property to get the name of the current data source.

 

The ImageKit10 VCL is a product created by Newtone Corporation