How to Create Hierarchical List Boxes (Functions/Subroutines/Programs)

This is part one of a two part series on the hierarchical list boxes.  The hierarchical list box is a list box control with the hierarchical property enabled. This type of list box lets you expand and collapse a hierarchy of information, much like you would use an outliner in word processing software. Part one in this series defines the elements and describes how to build a simple hierarchical list box that uses static text.  Part two, which will be included in OpenInsight Works 3.5, will describe how to create a more complex hierarchical list box.

 

About the Hierarchical List Boxes

There are a couple of ways to create a hierarchical list boxes within an application. The method you choose depends on what you want it to look like. One example is the repository outline in the OpenInsight Application Manager.  Double-clicking on a topic will expands that level and show topics in the level beneath it. Double-clicking on a second-level topic will likewise expand that item to show the levels below it. In the repository outline Application Manager, expand the main topic labeled Lotus Notes, and each topic below this one there under; there are three levels beneath the main topic as shown in the following figure..

  

 

 

Here is another simple example that demonstrates how to break down a main topic into sub-categories. The developer has created a form in which different operators and their functionality are described.  At the base level, the operator name and function are stated.  At the next level down, an example of  the proper syntax of the operator is shown.  Let s see how this is done.

 

 

In this case, the developer has set the information that will be displayed. This information is static; it will not change unless the developer chooses to change it. 

 

Creating a Hierarchical List box

 

Open Go into Form Designer and create a new form not based on a table.  Place a list box control on the form and resize it so it s big enough to work with.  Now, double-click on the list box control to open get to the properties dialogue box.

                                                           

To get the hierarchical effect, you need to make sure that the hierarchical list box property item is checked.  A Hierarchical list boxes usually contains graphical representations of each level contained in a single bitmap. For example, the following single bitmap contains two images. (You can find this bitmap in the \BMPS directory provided with OpenInsight   it s called REPOSBTN.BMP.)

 

 

 

To create the bitmap entity, click on the Create Entity button and specify the path of the bitmap you want to use.  You also need to make sure you specify the number of images in your bitmap entity. You can set or change this number by clicking on the  Number of Images drop-down arrow.   In the bitmap shown above you would select the number 2.

 The first image is the image at the far left and is represented by the number 1. In this case, that is the square with the blue and pink center.  Image number 2 is in the second position, in this case the square with the yellow and green center.

 

Levels are defined in numeric order as shown below.

Level 1

                  Level 2

                          

                              Level n

 

 

 

The last step is to construct the hierarchy of your list.  This is done in the Items section of the List Box Properties dialogue box using the following formula:

                                    image1 - level1: text

                  image2 - level2: text

                   

                  imagen - leveln: text

 

For example, to create the hierarchical list box shown above, you would fill in the following:

1-1:> or GT  (Greater Than)

2-2:   > 500

1-1:< or LT  (Less Than) 

2-2:   LT 15 MAY 1997

1-1:= or EQ  (Equal To) 

2-2:   = "Revelation Software"

1-1:>=   (Greater Than or Equal To)

2-2:   >= 1000

1-1:⇐   (Less Than or Equal To)

2-2:   ⇐ 1000

1-1:#  (Not Containing)

2-2:   # "Open Insight"

1-1:[]  (Containing)

2-2:   ["MAY"] or []"MAY"

 

When you are done, your List Box Properties dialogue box should look like the one below:

 

 

 

Lotus Notes

By default, when you bring over a view from Lotus Notes, the hierarchical nature of the view will automatically be transferred into OpenInsight when you choose by clicking on -File, New View or Folder in the Form Designer File menu, and then telling OpenInsight which registered Notes View you want to work with. This is done from within Form Designer.   Make sure that when you run your form, you choose click on Populate from the Search menu, then Populate to bring the data over from Notes.  The hierarchical view and associated functionality displays in the list box.will be there.  Here is an example of a Notes View that displays a list of documents by category, then by product, and then by priority in an OpenInsight Form.

 

kb0131_5.jpg

 

  • kb/kb_articles/kb0131.txt
  • Last modified: 2024/01/30 13:36
  • by 127.0.0.1