VisRadioListBox
Namespace: PPJ.Runtime.Vis
Assembly: PPJ.Web.Vis.50 (5.0.0.0)
Displays list selections using radio-button or checkbox pictures.
- C#
- VB.NET
public class VisRadioListBox : VisListBoxBase
Public Class VisRadioListBox
Inherits VisListBoxBase
Single-selection mode uses radio-button images. Other selection modes use checkbox images. The shared picture handles are loaded lazily by the constructor.
Example:
var choices = new VisRadioListBox();
choices.SelectionMode = Wisej.Web.SelectionMode.One;
choices.Add("Standard", true);
choices.Add("Express", false);
Constructors
VisRadioListBox()
Creates the list and loads the shared selection pictures when necessary.
Methods
Add(sText, bSelect)
Appends an item with the pictures appropriate to the current selection mode.
| Parameter | Type | Description |
|---|---|---|
| sText | SalString | The item caption. |
| bSelect | SalBoolean | Whether to select the new item. |
Returns: SalNumber. The index returned by the underlying picture-item operation.
When selected, a single-selection list replaces the selected index; other selection modes add the item to the selection. The item value is zero.
AddValue(sText, bSelect, nValue)
Appends an item with the pictures appropriate to the current selection mode.
| Parameter | Type | Description |
|---|---|---|
| sText | SalString | The item caption. |
| bSelect | SalBoolean | Whether to select the new item. |
| nValue | SalNumber | The application value associated with the item. |
Returns: SalNumber. The index returned by the underlying picture-item operation.
When selected, a single-selection list replaces the selected index; other selection modes add the item to the selection.
FromHandle(hWnd)
Resolves a SAL handle to an existing VisRadioListBox.
| Parameter | Type | Description |
|---|---|---|
| hWnd | SalWindowHandle | The control handle to resolve. |
Returns: VisRadioListBox. The associated control, or when no control is resolved.
Throws:
- InvalidCastException The handle identifies an incompatible control type.
Insert(nIndex, sText, bSelect)
Inserts an item with the pictures appropriate to the current selection mode.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The zero-based position before which to insert the item. |
| sText | SalString | The item caption. |
| bSelect | SalBoolean | Whether to select the new item. |
Returns: SalNumber. The index returned by the underlying picture-item operation.
When selected, a single-selection list replaces the selected index; other selection modes add the item to the selection. The item value is zero.
InsertValue(nIndex, sText, bSelect, nValue)
Inserts an item with the pictures appropriate to the current selection mode.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The zero-based position before which to insert the item. |
| sText | SalString | The item caption. |
| bSelect | SalBoolean | Whether to select the new item. |
| nValue | SalNumber | The application value associated with the item. |
Returns: SalNumber. The index returned by the underlying picture-item operation.
When selected, a single-selection list replaces the selected index; other selection modes add the item to the selection.
Implements
| Name | Description |
|---|---|
| ISalControl | |
| ISalListControl | |
| ISalWindow |