GeonBit.UI Documentation
SelectList Class |
List of items (strings) user can scroll and pick from.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)

C#
public class SelectList : Panel
The SelectList type exposes the following members.

Name | Description | |
---|---|---|
![]() | SelectList(Anchor, NullableVector2) |
Create the select list with default values.
|
![]() | SelectList(Vector2, Anchor, NullableVector2, PanelSkin) |
Create the select list.
|

Name | Description | |
---|---|---|
![]() | Background |
Optional background entity that will not respond to events and will always be rendered right behind this entity.
(Inherited from Entity.) |
![]() | Count |
How many items currently in the list.
|
![]() | Draggable |
Is the entity draggable (eg can a user grab it and drag it around).
(Inherited from Entity.) |
![]() | Empty |
Is the list currently empty.
|
![]() | EntityDefaultSize |
Return the default size for this entity.
(Inherited from Entity.) |
![]() | FillColor |
Entity fill color - this is just a sugarcoat to access the default fill color style property.
(Inherited from Entity.) |
![]() | InternalDestRect |
Get internal destination rect.
(Inherited from Entity.) |
![]() | IsDirty |
Get if this entity needs to recalculate destination rect.
(Inherited from Entity.) |
![]() | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.) |
![]() | IsMouseDown |
Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down).
(Inherited from Entity.) |
![]() | IsMouseOver |
Return if the mouse is currently over this entity (regardless of weather or not mouse button is down).
(Inherited from Entity.) |
![]() | Opacity |
Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property.
(Inherited from Entity.) |
![]() | OutlineColor |
Entity outline color - this is just a sugarcoat to access the default outline color style property.
(Inherited from Entity.) |
![]() | OutlineOpacity |
Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property.
(Inherited from Entity.) |
![]() | OutlineWidth |
Entity outline width - this is just a sugarcoat to access the default outline color style property.
(Inherited from Entity.) |
![]() | Padding |
Entity padding - this is just a sugarcoat to access the default padding style property.
(Inherited from Entity.) |
![]() | PanelOverflowBehavior |
Set / get panel overflow behavior.
Note: some modes require Render Targets, eg setting the 'UseRenderTarget' to true.
(Inherited from Panel.) |
![]() | Parent |
Get the direct parent of this entity.
(Inherited from Entity.) |
![]() | Priority |
Return entity priority in drawing order and event handling.
(Inherited from Entity.) |
![]() | Scale |
Entity scale - this is just a sugarcoat to access the default scale style property.
(Inherited from Entity.) |
![]() | Scrollbar |
Get the scrollbar of this panel.
(Inherited from Panel.) |
![]() | ScrollPosition |
Current scrollbar position.
|
![]() | SelectedIndex |
Currently selected item index (or -1 if none is selected).
|
![]() | SelectedValue |
Currently selected item value (or null if none is selected).
|
![]() | ShadowColor |
Entity shadow color - this is just a sugarcoat to access the default shadow color style property.
(Inherited from Entity.) |
![]() | ShadowOffset |
Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property.
(Inherited from Entity.) |
![]() | ShadowScale |
Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property.
(Inherited from Entity.) |
![]() | Size |
Entity current size property.
(Inherited from Entity.) |
![]() | Skin |
Set / get current panel skin.
(Inherited from Panel.) |
![]() | SpaceAfter |
Extra space (in pixels) to reserve *after* this entity when using Auto Anchors.
(Inherited from Entity.) |
![]() | SpaceBefore |
Extra space (in pixels) to reserve *before* this entity when using Auto Anchors.
(Inherited from Entity.) |
![]() | State |
Current entity state (default / mouse hover / mouse down..).
(Inherited from Entity.) |
![]() | Visible |
Set / get visibility.
(Inherited from Entity.) |

Name | Description | |
---|---|---|
![]() | AddChild |
Add a child entity.
(Inherited from Entity.) |
![]() | AddItem(String) |
Add value to list.
|
![]() | AddItem(String, Int32) |
Add value to list at a specific index.
|
![]() | BringToFront |
Bring this entity to be on front (inside its parent).
(Inherited from Entity.) |
![]() | CalcDestRect |
Calculate and return the destination rectangle, eg the space this entity is rendered on.
(Inherited from Entity.) |
![]() | CalcInternalRect |
Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first).
(Inherited from Panel.) |
![]() | ClearChildren |
Remove all children entities.
(Inherited from Entity.) |
![]() | ClearItems |
Remove all items from the list.
|
![]() | Dispose |
Dispose unmanaged resources related to this panel (render target).
(Inherited from Panel.) |
![]() | Draw |
Draw this entity and its children.
(Inherited from Entity.) |
![]() | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() | FindT(String, Boolean) |
Find and return first occurance of a child entity with a given identifier and specific type.
(Inherited from Entity.) |
![]() | GetActiveStyle |
Return stylesheet property for current entity state (or default if undefined for state).
(Inherited from Entity.) |
![]() | GetActualDestRect |
Return actual destination rectangle.
This can be override and implemented by things like Paragraph, where the actual destination rect is based on
text content, font and word-wrap.
(Inherited from Entity.) |
![]() | GetChildren |
Return all children of this entity.
(Inherited from Entity.) |
![]() | GetHashCode | Serves as the default hash function. (Inherited from Object.) |
![]() | GetRelativeOffset |
Return the relative offset, in pixels, from parent top-left corner.
(Inherited from Entity.) |
![]() | GetStyleProperty |
Return stylesheet property for a given state.
(Inherited from Entity.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | IsDeepChildOf |
Check if this entity is a descendant of another entity.
This goes up all the way to root.
(Inherited from Entity.) |
![]() | IsDisabled |
Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled.
(Inherited from Entity.) |
![]() | IsInsideEntity |
Test if a given point is inside entity's boundaries.
(Inherited from Entity.) |
![]() | IsLocked |
Return if this entity is currently locked, due to self or one of the parents / grandparents being locked.
(Inherited from Entity.) |
![]() | IsNaturallyInteractable |
Is the list a natrually-interactable entity.
(Overrides EntityIsNaturallyInteractable.) |
![]() | IsVisible |
Return if this entity is currently visible, eg this and all its parents and grandparents are visible.
(Inherited from Entity.) |
![]() | IterateChildren |
Iterate over children and call 'callback' for every direct child of this entity.
(Inherited from Entity.) |
![]() | MarkAsDirty |
Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things.
(Inherited from Entity.) |
![]() | MatchHeightToList |
Calculate the height of the select list to match the height of all the items in it.
|
![]() | PropagateEventsTo(DropDown) |
Propagate all events trigger by this entity to a given other entity.
For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well.
|
![]() | PropagateEventsTo(Entity) |
Propagate all events trigger by this entity to a given other entity.
For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well.
(Inherited from Entity.) |
![]() | PropagateEventsTo(SelectList) |
Propagate all events trigger by this entity to a given other entity.
For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well.
|
![]() | RemoveChild |
Remove child entity.
(Inherited from Entity.) |
![]() | RemoveFromParent |
Remove this entity from its parent.
(Inherited from Entity.) |
![]() | RemoveItem(Int32) |
Remove item from the list, by index.
|
![]() | RemoveItem(String) |
Remove value from the list.
|
![]() | scrollToEnd |
Move scrollbar to last item in list.
|
![]() | ScrollToSelected |
Move scrollbar to currently selected item.
|
![]() | SetAnchor |
Set the anchor of this entity.
(Inherited from Entity.) |
![]() | SetOffset |
Set the offset of this entity.
(Inherited from Entity.) |
![]() | SetPosition |
Set the position and anchor of this entity.
(Inherited from Entity.) |
![]() | SetStyleProperty |
Set a stylesheet property.
(Inherited from Entity.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
![]() | Unselect |
Clear current selection.
|
![]() | Update |
Called every frame to update entity state and call events.
(Inherited from Entity.) |
![]() | UpdateDestinationRects |
Update dest rect and internal dest rect.
This is called internally whenever a change is made to the entity or its parent.
(Inherited from Entity.) |
![]() | UpdateDestinationRectsIfDirty |
Update dest rect and internal dest rect, but only if needed (eg if something changed since last update).
(Inherited from Entity.) |
![]() | UpdateStyle |
Update the entire stylesheet from a different stylesheet.
(Inherited from Entity.) |

Name | Description | |
---|---|---|
![]() | AddWhenClipping |
String to append when clipping items width.
|
![]() | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.) |
![]() | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.) |
![]() | AllowReselectValue |
If true and user clicks on the item currently selected item, it will still invoke value change event as if
a new value was selected.
|
![]() | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.) |
![]() | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.) |
![]() | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.) |
![]() | ClickThrough |
If this boolean is true, events will just "go through" this entity to its children or entities behind it.
This bool comes to solve conditions where you have two panels without skin that hide each other but you want
users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first
panel's children.
(Inherited from Entity.) |
![]() | ClipTextIfOverflow |
If true and an item in the list is too long for its width, the list will cut its value to fit width.
|
![]() ![]() | DefaultParagraphStyle | Default styling for select list labels. Note: loaded from UI theme xml file. |
![]() ![]() | DefaultSize | Default select list size in pixels. |
![]() ![]() | DefaultStyle | Default styling for the select list itself. Note: loaded from UI theme xml file. |
![]() | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.) |
![]() | ExtraMargin |
Adds extra space outside the dest rect for collision detection.
In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity,
it would still think the user points on the entity.
(Inherited from Entity.) |
![]() | ExtraSpaceBetweenLines | Extra space (in pixels) between items on Y axis. |
![]() | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.) |
![]() | ItemsScale | Scale items in list. |
![]() | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.) |
![]() | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.) |
![]() | LockedItems |
Optional dictionary of list indexes you want to lock.
Every item in this dictionary set to true will be locked and user won't be able to select it.
|
![]() | LockSelection | When set to true, users cannot change the currently selected value.
Note: unlike the basic entity "Locked" that prevent all input from entity and its children,
this method of locking will still allow users to scroll through the list, thus making it useable
as a read-only list entity. |
![]() | MaxItems |
If provided, will not be able to add any more of this number of items.
|
![]() | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.) |
![]() | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.) |
![]() | OnListChange | Special callback to execute when list size changes. |
![]() | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.) |
![]() | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.) |
![]() | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.) |
![]() | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.) |
![]() | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.) |
![]() | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.) |
![]() | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.) |
![]() | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.) |
![]() | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.) |
![]() | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired.
If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being
held down, as long as its released inside).
Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.) |
![]() | ToolTipText |
Optional tooltip text to show if the user points on this entity for long enough.
(Inherited from Entity.) |
![]() | UseActualSizeForCollision |
If true (default), will use the actual object size for collision detection. If false, will use the size property.
This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally
different than the size set in the constructor.
(Inherited from Entity.) |
![]() | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.) |
![]() | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.) |
![]() | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity. (Inherited from Entity.) |
