All pages
Powered by GitBook
1 of 1

Loading...

ListBox

Wisej.Web.ListBox

Namespace: Wisej.Web

Assembly: Wisej.Framework (2.5.0.0)

  • Control

    • ListControl

Represents a control to display a list of items.

Constructors

ListBox()

Initializes a new instance of .

Properties

AllowHtml

: Returns or sets a value indicating that the control can display HTML in the Text property.

HorizontalScrollbar

: Returns or sets whether a horizontal scroll bar is displayed in the control.

IncrementalSelection

: Returns or sets whether items are selected incrementally as the user types within a timeout of 1 second.

ItemHeight

: Gets or sets the height of the list items. When the value is -1, uses the value set in the theme.

Throws:

  • The assigned value is less than -1; or the assigned value is greater than 500.

Items

: Returns the collection of the items contained in this .

Label

: Provides a label related to the control.

LabelText

: Returns or sets the localizable label associated with this control.

LazyLoading

: Returns or sets whether the items in the list are send to the client when the list becomes visible the first time.

ReadOnly

: Returns or sets whether the control is read-only.

RightClickSelection

: Returns or sets whether the item under the pointer gets selected on a right click.

When the right click lands outside of a selected area the selection is not changed regardless of the value of .

ScrollAlwaysVisible

: Returns or sets whether the vertical scroll bar is shown at all times.

SelectedIndex

: Returns or sets the zero-based index of the currently selected item in a .

Throws:

  • The assigned value is less than -1 or greater than or equal to the item count.

  • The property is set to None.

SelectedIndices

: Returns a collection that contains the zero-based indexes of all currently selected items in the .

SelectedItem

: Returns or sets the currently selected item in the .

SelectedItems

: Returns a collection containing the currently selected items in the .

SelectionMode

: Returns or sets the method in which items are selected in the .

Sorted

: Returns or sets whether the items in the combo box are sorted.

Throws:

  • An attempt was made to sort a that is attached to a data source.

Tools

: Returns the instance of associated with this control.

TopIndex

: Returns or sets the index of the first visible item in the .

Methods

BeginUpdate()

Not used. Kept for compatibility.

ClearSelected()

Unselects all items in the .

EndUpdate()

Not used. Kept for compatibility.

FindString(text)

Returns the index of the first item in the that starts with the specified string.

Parameter
Type
Description

Returns: . The zero-based index of the first item found; returns -1 if no match is found.

FindString(text, startIndex)

Returns the index of the first item in the beyond the specified index that contains the specified string. The search is not case sensitive.

Parameter
Type
Description

Returns: . The zero-based index of the first item found; returns -1 if no match is found, or 0 if the text parameter specifies .

FindStringExact(text)

Finds the first item in the combo box that matches the specified string.

Parameter
Type
Description

Returns: . The zero-based index of the first item found; returns -1 if no match is found, or 0 if the text parameter specifies .

FindStringExact(text, startIndex)

Finds the first item after the specified index that matches the specified string.

Parameter
Type
Description

Returns: . The zero-based index of the first item found; returns -1 if no match is found, or 0 if the text parameter specifies .

GetSelected(index)

Returns a value indicating whether the specified item is selected.

Parameter
Type
Description

Returns: . true if the specified item is currently selected in the ; otherwise, false.

Throws:

  • The specified index was outside the range of valid values.

SelectAll()

Selects all the items in the .

SetSelected(index, selected)

Selects or clears the selection for the specified item in a .

Parameter
Type
Description

Throws:

  • The specified index was outside the range of valid values.

  • The property is set to None.

Events

Load

Fired when the property is true and the is first shown.

When is true An application may fill the items at any time prior to the being shown, or while processing the event.

ReadOnlyChanged

Fired when the value of the property has changed.

SelectedIndexChanged

Fired when the property or the collection has changed.

SortedChanged

Fired when the property has changed.

ToolClick

Fired when a is clicked.

Inherited By

Name
Description

Implements

Name
Description

text

String

The String to search for.

text

String

The String to search for.

startIndex

Int32

The zero-based index of the item before the first item to be searched. Set to -1 to search from the beginning of the control.

text

String

The String to search for.

text

String

The String to search for.

startIndex

Int32

The zero-based index of the item before the first item to be searched. Set to -1 to search from the beginning of the control.

index

Int32

The zero-based index of the item that determines whether it is selected.

index

Int32

The zero-based index of the item in a ListBox to select or clear the selection for.

selected

Boolean

true to select the specified item; otherwise, false.

CheckedListBox

Displays a ListBox in which a check box is displayed to the left of each item.

IBindableComponent

Bindable components implement this interface.

IWisejComponent

All wisej components implement this interface.

IWisejControl

All wisej controls derived from the Control class must implement this interface.

IWisejSerializable

Allows an object to serialize itself.

ListBox
Public Class ListBox
    Inherits ListControl
ListBox
Boolean
Boolean
Boolean
Int32
ArgumentOutOfRangeException
ObjectCollection
ListBox
LabelWrapper
String
Boolean
Boolean
Boolean
RightClickSelection
Boolean
Int32
ListBox
ArgumentOutOfRangeException
ArgumentException
SelectionMode
SelectedIndexCollection
ListBox
Object
ListBox
SelectedObjectCollection
ListBox
SelectionMode
ListBox
Boolean
ArgumentException
ListBox
ComponentToolCollection
ComponentToolCollection
Int32
ListBox
ListBox
ListBox
Int32
ListBox
Int32
Empty
Int32
Empty
Int32
Empty
Boolean
ListBox
ArgumentOutOfRangeException
ListBox
ListBox
ArgumentOutOfRangeException
InvalidOperationException
SelectionMode
EventHandler
LazyLoading
ListBox
LazyLoading
ListBox
Load
EventHandler
ReadOnly
EventHandler
SelectedIndex
SelectedIndices
EventHandler
Sorted
ToolClickEventHandler
ComponentTool
public class ListBox : ListControl