Interface IListboxComponent
A component for displaying a list of items (as text), and allowing selecting an item from the list.
Inherited Members
Namespace: AGS.API
Assembly: AGS.API.dll
Syntax
[RequiredComponent(typeof(IScaleComponent), true)]
[RequiredComponent(typeof(IInObjectTreeComponent), true)]
[RequiredComponent(typeof(IImageComponent), true)]
[RequiredComponent(typeof(IStackLayoutComponent), true)]
[RequiredComponent(typeof(IVisibleComponent), true)]
public interface IListboxComponent : IComponent, IDisposable, INotifyPropertyChanged
Properties
| Improve this Doc View SourceItems
Gets the list of items which are up for selection.
Declaration
IAGSBindingList<IStringItem> Items { get; }
Property Value
Type | Description |
---|---|
IAGSBindingList<IStringItem> | The items. |
ListItemFactory
Gets or sets the factory function for creating the UI controls which will be displayed for each item in the list. The function gets the text of the item and should return a UI control.
Declaration
Func<string, IUIControl> ListItemFactory { get; set; }
Property Value
Type | Description |
---|---|
System.Func<System.String, IUIControl> | The list item factory. |
ListItemUIControls
Gets the list item UI controls.
Declaration
IEnumerable<IUIControl> ListItemUIControls { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IUIControl> | The item UI controls. |
MaxHeight
Gets or sets the maximum height of the box. If it is expected for the items in the list to exceed the height, scrollbars should be added to the list (CreateScrollingPanel(IPanel, Single, Single, Single) ).
Declaration
float MaxHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The maximum height. |
MaxWidth
Gets or sets the maximum width of the box. If it is expected for the items in the list to exceed the width, scrollbars should be added to the list (CreateScrollingPanel(IPanel, Single, Single, Single) ).
Declaration
float MaxWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The maximum width. |
MinHeight
Gets or sets the minimum height for the box.
Declaration
float MinHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The minimum height. |
MinWidth
Gets or sets the minimum width for the box.
Declaration
float MinWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The minimum width. |
OnSelectedItemChanged
An event which fires whenever the selected item in the dropdown was changed (this can be because the user selected an item, or because the SelectedIndex was set from code).
Declaration
IBlockingEvent<ListboxItemArgs> OnSelectedItemChanged { get; }
Property Value
Type | Description |
---|---|
IBlockingEvent<ListboxItemArgs> | The on selected item changed event. |
OnSelectedItemChanging
An event which fires whenever the selected item in the dropdown is in the process of being changed (this can be because the user selected an item, or because the SelectedIndex was set from code). The selection has not been applied yet in this event, and can be cancelled by the event subscriber by settings ShouldCancel to true.
Declaration
IEvent<ListboxItemChangingArgs> OnSelectedItemChanging { get; }
Property Value
Type | Description |
---|---|
IEvent<ListboxItemChangingArgs> | The on selected item changing event. |
Padding
Gets or sets the padding that will be added to the box (this is performed before applying min/max width/height).
Declaration
SizeF Padding { get; set; }
Property Value
Type | Description |
---|---|
SizeF | The padding. |
SearchFilter
Gets or sets the search filter (a search text that filters the tree so that only items containing the text appear in the list).
Declaration
string SearchFilter { get; set; }
Property Value
Type | Description |
---|---|
System.String | The search filter. |
SelectedIndex
Gets or sets the selected item index (a 0 based index of the items list).
Declaration
int SelectedIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The index of the selected. |
SelectedItem
Gets the selected item.
Declaration
IStringItem SelectedItem { get; }
Property Value
Type | Description |
---|---|
IStringItem | The selected item. |