Modifying a Choice List Menu

You may want to change the items in a choice list based on runtime data. Functions are provided to allow you to insert, delete, and replace the items in a choice list.

If you change the choice list items while the choice list is displayed, these functions inform cl_rd() to update the choice list if any visible part of the choice list has changed.

When inserting and deleting items, the items are essentially renumbered. Vermont Views makes sure that the current item remains highlighted even if it has a different item number. The system also attempts to keep the current item in the same location in the choice list window.

For example, suppose the choice list item contains the following items: Apples, Oranges, Pears, Bananas, Grapes, Plums. The window displaying this choice list looks like this:

Figure 48.1: Pears, bananas, grapes

Now Pears is deleted from the choice list and the window is redisplayed. The system would renumber the items but keep Bananas the current item in the middle position of the window, like this:

Figure 48.2: Oranges, bananas, grapes

In some cases, it would be impossible to keep the current item in the same position in the window. In this example, if the user deleted all items before Bananas, the window would look like this:


Figure 48.3: Bananas, grapes, plums

The system will do this for all choice lists, even if they are not displayed. Internally, the settings are made so that when the choice list next appears, it appears similar to the user.

More:

Inserting an Item in a Choice List

Deleting an Item from a Choice List

Replacing an Item in a Choice List


Home Contents Previous Next