single-item-list

Class

Package: common-graphics

Class

The class of the single-item-list control.

Control

An instance of the single-item-list class. A list box highlighting a single item in its window. The list is navigable from the keyboard via the arrow keys. HOME and END keys take users to the top and bottom of the list, respectively.

The range property holds the list of items to be displayed; list items appear in the order you enter them in the range.

The value field is set to the item selected by the user, and is shown highlighted in the list. If no item is highlighted, the value field is set to nil.

Adding a single-item-list control to your form

Click the single-item-list tool on the Component toolbar. Move the mouse cursor to the part of the form where you want to place the control, and click again. The control will appear with colored resizing handles.

Resizing and moving the control

Controls can only be resized and moved on forms during the design stage; the size and location of everything is fixed on a running form.

Resize the control by clicking the mouse cursor and dragging one of the handles to the new size-point. Release the mouse key when you are satisfied with the new size. Note: resizing the single item list won't mean proportional changes in the size of the characters inside the list. Change the font property if you want to change the size of the actual characters displayed.

Move the control by clicking anywhere on it except a resizing handle and dragging it to a new location on the form. Release the mouse key when you are ready to place the control.

Scrollbars

Single-item-list controls cannot have a horizontal scrollbar, so the valid choices are :vertical and nil for the scrollbars property. If a horizontal scrollbar is needed on a single-item-list, an outline control could be used instead, using only top-level items in the range and turning off the draw-icons property to simulate an item-list.

See About how to get sample code for creating controls in cgide.htm, which explains how to use the IDE to create such code.

Common Graphics and IDE documentation is described in About Common Graphics and IDE documentation in cgide.htm.

The documentation is described in introduction.htm and the index is in index.htm.

Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.

Created 2000.10.5.