dbicExplorerBar Send comments on this topic.
Developing with dbicExplorerBar - Creating Lists

Glossary Item Box

The dbicExplorerBar control is designed to host collections of items described in lists.  NOTE: A list can also be defined as a Panel, in which case it becomes a container for other objects instead of list items.  Lists can be added to the control at design-time by clicking on the button in the Lists (Collection) property in the property inspector or by clicking on the arrow in the top right of the control instance to invoke the list designer.  Lists can also be added at runtime through code.  In the following example two lists and their associated items are added to a dbicExplorerBar instance (dbicExplorerBar).  NOTE: The dbicExplorerBar FirstDraw event is the ideal place to code the loading of lists and items into the control.

 

Example:

 

VB.NET

'Create an instance of a new dbicExplorerBar list from the dbicExplorerBar.dll

Dim DbiExplorerList As Dbi.WinControl.ExplorerBar.dbiExplorerList  

 

'Add the first list to the control titled "Flowchart Shapes"

'Use the Lists.Add method to create a new list in the control and return the list object.

DbiExplorerList = dbicExplorerBar.Lists.Add("Flowchart Shapes"

       

'Add items to the Flowchart Shapes list  

'Use the Items.Add method of the list object to add a new item to the List.

DbiExplorerList.Items.Add("Process", 0)

DbiExplorerList.Items.Add("Decision", 1)

DbiExplorerList.Items.Add("Document", 2)

DbiExplorerList.Items.Add("Data", 3)

DbiExplorerList.Items.Add("Predefined Process", 4)

DbiExplorerList.Items.Add("Stored Data", 5)

DbiExplorerList.Items.Add("Entity", 6)

 

'Add a second list to the control titled "Database Items"

DbiExplorerList = dbicExplorerBar.Lists.Add("Database Items")

       

'Add items to the Database Items list

DbiExplorerList.Items.Add("Data Entity", 7)

DbiExplorerList.Items.Add("Database", 8)

DbiExplorerList.Items.Add("Value", 9)

 

C#

// Create an instance of a new dbicExplorerBar list from the dbicExplorerBar.dll

Dbi.WinControl.ExplorerBar.dbiExplorerList DbiExplorerList = new _ Dbi.WinControl.ExplorerBar.dbiExplorerList();  

 

// Add the first list to the control titled "Flowchart Shapes"

// Use the Lists.Add method to create a new list in the control and return the list object.

DbiExplorerList = dbicExplorerBar.Lists.Add("Flowchart Shapes"); 

 

// Add items to the Flowchart Shapes list

// Use the Items.Add method of the list object to add a new item to the list.

DbiExplorerList.Items.Add("Process", 0);

DbiExplorerList.Items.Add("Decision", 1);

DbiExplorerList.Items.Add("Document", 2);

DbiExplorerList.Items.Add("Data", 3);

DbiExplorerList.Items.Add("Predefined Process", 4);

DbiExplorerList.Items.Add("Stored Data", 5);

DbiExplorerList.Items.Add("Entity", 6);

 

// Add a second list to the control titled "Database Items";

DbiExplorerList = dbicExplorerBar.Lists.Add("Database Items");

 

// Add items to the Database Items list;

DbiExplorerList.Items.Add("Data Entity", 7);

DbiExplorerList.Items.Add("Database", 8);

DbiExplorerList.Items.Add("Value", 9);