ISalListControl
Namespace: PPJ.Runtime.Windows
Assembly: PPJ.Web.50 (5.0.0.0)
Provides item access, searching, and selection for SAL list controls.
- C#
- VB.NET
public interface ISalListControl
Public Interface ISalListControl
Example:
void Populate(PPJ.Runtime.Windows.ISalListControl list)
{
list.Clear();
list.AddRange(new object[] { "Open", "Closed" });
list.SelectedIndex = list.Find("Open");
}
Properties
AllowHtml
Boolean: Gets or sets whether item content can be rendered as HTML.
Count
Int32: Gets the number of items in the control.
Item(index)
Object: Gets or replaces an item by its position.
Items
IList: Gets the collection of items displayed by the control.
SelectedIndex
Int32: Gets or sets the selected item's zero-based index, or -1 when no item is selected.
SelectedIndices
Int32[]: Gets the zero-based indices of the selected items.
SelectedItem
Object: Gets or sets the selected item, or when no item is selected.
SelectionMode
SelectionMode: Gets or sets whether and how the control permits multiple selections.
Methods
Add(item)
Adds an item to the control.
| Parameter | Type | Description |
|---|---|---|
| item | Object | The item to add. |
Returns: Int32. The zero-based index assigned to the item.
AddRange(items)
Adds an array of items to the control.
| Parameter | Type | Description |
|---|---|---|
| items | Object[] | The items to add, in input order; a sorted control determines their final positions. |
Clear()
Removes all items from the control.
Delete(index)
Removes the item at the specified position.
| Parameter | Type | Description |
|---|---|---|
| index | Int32 | The zero-based index to remove. |
Returns: Int32. The remaining item count, or Sys.LB_Err if the index is invalid.
Find(item)
Searches the item collection for an object.
| Parameter | Type | Description |
|---|---|---|
| item | Object | The object to locate. |
Returns: Int32. The matching item's zero-based index, or -1 if no item matches.
FindString(text, startIndex)
Searches for an item whose display text starts with the specified text.
| Parameter | Type | Description |
|---|---|---|
| text | String | The text prefix to locate. |
| startIndex | Int32 | The index supplied to the control's search operation; -1 requests its initial search position. |
Returns: Int32. The matching item's zero-based index, or -1 when no match is found or the start index is rejected.
FindStringExact(text, startIndex)
Searches for an item whose display text matches the specified text.
| Parameter | Type | Description |
|---|---|---|
| text | String | The complete display text to locate. |
| startIndex | Int32 | The index supplied to the control's search operation; -1 requests its initial search position. |
Returns: Int32. The matching item's zero-based index, or -1 when no match is found or the start index is rejected.
Insert(index, item)
Inserts an item at a requested position.
| Parameter | Type | Description |
|---|---|---|
| index | Int32 | The zero-based insertion position, or -1 to append the item. |
| item | Object | The item to insert. |
Returns: Int32. The item's resulting index, or Sys.LB_Err if the position is invalid. A sorted control may choose a different index.
IsSelected(index)
Determines whether a particular item is selected.
| Parameter | Type | Description |
|---|---|---|
| index | Int32 | The zero-based item index. |
Returns: Boolean. if the item is selected; otherwise, .
SetSelected(index, selected)
Changes an item's selection state.
| Parameter | Type | Description |
|---|---|---|
| index | Int32 | The zero-based item index. |
| selected | Boolean | to select the item; to deselect it. |
UpdateItem(item)
Refreshes an item's representation on the client.
| Parameter | Type | Description |
|---|---|---|
| item | Object | The existing item whose rendered content has changed. |
Implemented By
| Name | Description |
|---|---|
| SalComboBox | Combines a selectable item list with SAL editing, formatting, and validation behavior. |
| SalListBox | Displays a selectable item list with SAL value conversion, item access, and window actions. |
| SalTableColumn | Defines a SAL table column, its per-row value, display formatting, editor, and window actions. |
| VisColorComboBox | |
| VisColorListBox | |
| VisComboBoxBase | |
| VisDesktopListBox | |
| VisDirListBox | |
| VisDirTreeListBox | |
| VisDriveComboBox | |
| VisDriveListBox | |
| VisDropDownBase | |
| VisFileListBox | |
| VisFontComboBox | |
| VisFontListBox | |
| VisFontNameComboBox | |
| VisFontNameListBox | |
| VisListBoxBase | |
| VisListViewDropDown | |
| VisOutlineComboBox | |
| VisOutlineListBox | |
| VisPictureComboBox | |
| VisPictureListBox | |
| VisRadioListBox |