ListBox Object

Here are the object's settings as they appear in the properties inspector:

ListBox Object

Name

The name that is used to identify this object.

Contents

The items that are contained in the listbox. Click the edit button ( ) to open the ListBox Contents dialog where you can create or modify your list.

A list consists of a number of items, each one with two parts: item text, which is the visible part that will appear in the listbox, and item data, which is an invisible part that is associated with that item. You can use the item data to store any information that you want to associate with the item text, such as a file path or page name.

Items can be added to the list by clicking on one of the fields and entering the desired text. You can manipulate the list using the buttons at the bottom of the dialog. The insert ( ) button can be used to insert an item into the list, essentially inserting a new "row." The remove ( ), up ( ), and down ( ) buttons allow you to remove or move items in the list. The ascending ( ) and descending ( ) buttons can be used to sort the list in ascending or descending order.

Font

The font that you want to use for the text. Click the edit button ( ) to open the Font dialog where you can edit all of the font settings.

Family

The font family that you want to use.

Size

The font size, in points.

Bold

Make the text bolded.

Italic

Make the text appear in italics.

Text Color

The text color to use for the listbox items.

Tip: You can click the select button ( ) to bring up a color chooser.

Back Color

The background color to use for the object.

Multi-Select

Enable multiple listbox items to be selected at one time. Choose from:

True

Multiple items can be selected in the object at one time.

False

Only one listbox item can be selected at one time.

Sort

Sort and display the listbox items alphabetically at runtime. Choose from:

True

Listbox items will be displayed in alphabetical order.

False

Listbox items will be displayed in the order they appear at design time.

V. Scroll

Include a vertical scroll bar for the object. Choose from:

True

Include a vertical scroll bar.

False

Don't include a vertical scroll bar.

H. Scroll

Include a horizontal scroll bar for the object. Choose from:

True

Include a horizontal scroll bar.

False

Don't include a horizontal scroll bar.

Border

The border style to display around the object. Choose from:

None

Don't display any border around the object.

Flat

Display a thin black border around the object.

Sunken

The object will have a "sunken" appearance on the page.

Attributes

Tooltip

A short string of text that will appear after the mouse hovers over this object for a moment.

Enabled

Enable the object so it responds to user interaction. Choose from:

True

The object will respond to mouse overs and clicks and perform any actions assigned to its events.

False

The object will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the ListBox.SetEnabled action to enable this object.

Visible

Set the object's initial visibility. Choose from:

True

The object will be visible when the page is displayed.

False

The object will be invisible when the page is displayed.

Note: You can use the ListBox.SetVisible action to make the object visible or invisible at run time.

Left

The distance in pixels from the left edge of the object to the left edge of the page.

Tip: You can also change the position of an object by dragging it.

Top

The distance in pixels from the top edge of the object to the top edge of the page.

Width

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height

The height of the object in pixels.

Actions

On Select

The actions that will be performed when the user selects or deselects items in the listbox. Click the edit button ( ) to open the action editor.

On Double-Click

The actions that will be performed when the user double-clicks an item in the listbox. Click the edit button ( ) to open the action editor.

On Key

The actions that will be performed whenever the listbox object has focus and the user presses a key.

The following event variables are automatically set whenever this event is triggered:

e_Key

(number) The virtual key code of the key that was pressed.

e_Modifiers

(table) A table containing three boolean values that describe which modifier keys were held down while the key was pressed. A modifier key is a key that can be held down while another key is pressed, to "modify" it.

There are three true/false values in the table, one for each type of modifier key on the keyboard: shift, ctrl, and alt. You can access these values as e_Modifiers.shift, e_Modifiers.ctrl, and e_Modifiers.alt.

On Focus

The actions that will be performed whenever the listbox object is given focus. For example, it will be given focus if the user clicks inside the object. Click the edit button ( ) to open the action editor.