ListBox Control

A List box control displays a list of items from which the user can select one or more.

Client support

   Newlook Smartclient

   Newlook Server

Use

A list box control is similar to a combo box control except that it can display as many items in its initial list as its height will allow.

If the number of items exceeds the number that can be displayed, a scroll bar is automatically added to the list box control.

Combo vs list box

As a general rule, a combo box control is recommended when you want to provide a list of suggested choices, whereas a list box is appropriate when you want to limit input to a set list of items. A combo box control contains an edit field, hence choices that are not in the list can be entered into the field. List box entry is restricted to items in its list. It is worth noting however that a combo box can be configured so that user entry is restricted to items in the drop down list. This is done by setting the Style property of a combo box control to ComboDropDownList.

The main difference between the two control is the way the list is displayed. In a combo box the full list is not displayed until you click the down arrow, whereas in a list box control, the list is initially visible within the control area.

Unlike the combo box control, a list box control will never be automatically generated from a host field.

BE AWARE THAT:

If your list box control contains more than two list items then it will need to be high enough to sufficiently display two items in its body or it will not be usable in Newlook Server. If the height of the control is not high enough, then items in the list may be skipped when the user clicks the control's arrow buttons in Newlook Server. If you do not have enough space on your form for the required height, consider using a read-only ComboBox control instead.

Material skin considerations

When the material skin is enabled in your solution, list boxes will be rendered with material styling. The most noticeable difference is an increase in the spacing within the list itself.

Material skin

Classic skin

See Also

ComboBox control | List property 


© 2004-2021 looksoftware. All rights reserved.