WebListBox

From Real Software Documentation

Jump to: navigation, search

     

For desktop applications, see ListBox.
Class (inherits from WebControl)

A scrollable, multicolumn listbox control. Very similar to the regular desktop Listbox control.

Events
CellClick KeyPressed MouseUp
Close LostFocus Open
ContextualMenuAction MouseDown Resized
DoubleClick MouseDrag SelectionChanged
GotFocus MouseExit Shown
Hidden MouseMove


Properties
AlternateRowColor HorizontalCenter Page
CellTag LastIndex Parent
ColumnCount Left Parent
ColumnWidth List PrimaryRowColor
ColumnWidths ListIndex RowCount
ContextualMenu LockBottom RowHeight
ControlID LockHorizontal Style
Cursor LockLeft Top
Enabled LockRight VerticalCenter
HasHeading LockTop Visible
Heading LockVertical Width
Height MinimumRowHeight Zindex
HelpTag Name


Methods
AddRow DeleteAllRows RemoveRow
Cell ExecuteJavaScript RowTag
CellStyle InsertRow Selected
Close MsgBox SetFocus
ColumnStyle PresentContextualMenu ShowURL


Notes

The WebListBox provides most of the features of the desktop Listbox, including alternating row colors. Here is the WebListBox that is part of the Web Tutorial.

A WebListBox.


Use the CellStyle and ColumnStyle methods to add style information to selected cells and/or columns. This is the tool for changing the borders, font size and style, background, opacity, and other styling attributes of WebListboxes. See the WebStyle entry for more information on the features that can be added via style sheets.


Example

This example illustrates the new feature of the Web version of the AddRow method. Since it uses the ParamArray keyword, it is now possible to add more than one column to the WebListBox in the AddRow call. the WebPage contains two WebTextFields and a WebButton that adds the contents of both fields to the WebListBox. Its Action event handler is this:

if PeopleList.ListIndex = -1 then
'The WebListBox.AddRow method allows you to pass multiple parameters
'to add values to other columns of the new row
PeopleList.addrow FirstNameField.text, LastNameField.text
else
PeopleList.cell(PeopleList.listindex, 0) = FirstNameField.text
PeopleList.cell(PeopleList.listindex, 1) = LastNameField.text
end if

See the events, properties, and methods for individual examples.

See Also

ListBox, WebPage, WebObject, WebStyle.

Personal tools