Created by Docfx
  • Api Documentation
  • Api Documentation
Show / Hide Table of Contents

Class ListBox

Implements a text list box.

Inheritance
Object
BaseScreenComponent
ListBox
Inherited Members
BaseScreenComponent.rectRestrictedRenderArea
BaseScreenComponent.restrictedRenderAreaCustomParent
BaseScreenComponent.restrictedRenderAreaCoordinateType
BaseScreenComponent.backgroundTexture
BaseScreenComponent.animatedBackgroundTextures
BaseScreenComponent.backgroundTextureLayout
BaseScreenComponent.OnKeyboardEvent
BaseScreenComponent.OnMouseEnter
BaseScreenComponent.OnMouseLeave
BaseScreenComponent.OnMouseMove
BaseScreenComponent.OnMouseDown
BaseScreenComponent.OnMouseUp
BaseScreenComponent.OnMouseClick
BaseScreenComponent.OnMouseDoubleClick
BaseScreenComponent.OnRightMouseDown
BaseScreenComponent.OnRightMouseUp
BaseScreenComponent.OnRightMouseClick
BaseScreenComponent.OnRightMouseDoubleClick
BaseScreenComponent.OnMiddleMouseDown
BaseScreenComponent.OnMiddleMouseUp
BaseScreenComponent.OnMiddleMouseClick
BaseScreenComponent.OnMiddleMouseDoubleClick
BaseScreenComponent.OnMouseScrollUp
BaseScreenComponent.OnMouseScrollDown
BaseScreenComponent.Enabled
BaseScreenComponent.UseFocus
BaseScreenComponent.OverridesHotkeySequences
BaseScreenComponent.Name
BaseScreenComponent.Tag
BaseScreenComponent.Position
BaseScreenComponent.Size
BaseScreenComponent.RootSize
BaseScreenComponent.Parent
BaseScreenComponent.Rectangle
BaseScreenComponent.HorizontalAlignment
BaseScreenComponent.VerticalAlignment
BaseScreenComponent.RestrictedRenderAreaCoordinateType
BaseScreenComponent.RectRestrictedRenderArea
BaseScreenComponent.RestrictedRenderAreaCustomParent
BaseScreenComponent.UseRestrictedRenderArea
BaseScreenComponent.CustomMousePosition
BaseScreenComponent.MousePosition
BaseScreenComponent.LastMousePosition
BaseScreenComponent.ScaledMousePosition
BaseScreenComponent.BackgroundColor
BaseScreenComponent.MouseOverBackgroundColor
BaseScreenComponent.BackgroundColorTexture
BaseScreenComponent.BackgroundTexture
BaseScreenComponent.BackgroundCroppedRect
BaseScreenComponent.AnimatedBackgroundTextures
BaseScreenComponent.AnimationDelayInSeconds
BaseScreenComponent.BackgroundTextureLayout
BaseScreenComponent.InteriorWidth
BaseScreenComponent.InteriorHeight
BaseScreenComponent.Scale
BaseScreenComponent.AutoSize
BaseScreenComponent.LocalScale
BaseScreenComponent.ToolTip
BaseScreenComponent.ToolTipText
BaseScreenComponent.SuppressToolTip
BaseScreenComponent.MinAutoScale
BaseScreenComponent.MaxAutoScale
BaseScreenComponent.MouseOverComponent
BaseScreenComponent.TopMargin
BaseScreenComponent.BottomMargin
BaseScreenComponent.LeftMargin
BaseScreenComponent.RightMargin
BaseScreenComponent.ScreenToLocal(Vector2)
BaseScreenComponent.ScreenToLocal(Rect)
BaseScreenComponent.GotFocus()
BaseScreenComponent.LostFocus()
BaseScreenComponent.TriggerMouseClick()
BaseScreenComponent.KeyboardEvent(Event)
BaseScreenComponent.RightMouseClick(Vector2)
BaseScreenComponent.MiddleMouseClick(Vector2)
BaseScreenComponent.RightMouseDoubleClick(Vector2)
BaseScreenComponent.MiddleMouseDoubleClick(Vector2)
BaseScreenComponent.MouseEnter()
BaseScreenComponent.Dispose()
BaseScreenComponent.SetMargins(Margins, Int32)
BaseScreenComponent.OffsetFrom(BaseScreenComponent, Sides, Int32)
BaseScreenComponent.SetFocus()
BaseScreenComponent.HasFocus()
Namespace: DaggerfallWorkshop.Game.UserInterface
Assembly: Assembly-CSharp.dll
Syntax
public class ListBox : BaseScreenComponent, IDisposable

Constructors

| Improve this Doc View Source

ListBox()

Declaration
public ListBox()

Properties

| Improve this Doc View Source

AlwaysAcceptKeyboardInput

List will accept keyboard input even when mouse not over control. Do not set this when multiple lists are used within same UI, or any other control where inputs might overlap.

Declaration
public bool AlwaysAcceptKeyboardInput { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

Count

Declaration
public int Count { get; }
Property Value
Type Description
Int32
| Improve this Doc View Source

EnabledHorizontalScroll

Enables horizontally scrolling of listbox content (this mode can be used if textlabels do not horizontally fit into listbox entirely)

Declaration
public bool EnabledHorizontalScroll { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

Font

Declaration
public DaggerfallFont Font { get; set; }
Property Value
Type Description
DaggerfallFont
| Improve this Doc View Source

HorizontalScrollIndex

Horizontal scroll index - depending on HorizontalScrollMode its unit is either in characters or pixels

Declaration
public int HorizontalScrollIndex { get; set; }
Property Value
Type Description
Int32
| Improve this Doc View Source

HorizontalScrollMode

set horizontal scroll mode to either character wise or pixel wise

Declaration
public ListBox.HorizontalScrollModes HorizontalScrollMode { get; set; }
Property Value
Type Description
ListBox.HorizontalScrollModes
| Improve this Doc View Source

ListItems

Declaration
public List<ListBox.ListItem> ListItems { get; }
Property Value
Type Description
List<ListBox.ListItem>
| Improve this Doc View Source

MaxCharacters

Maximum length of label string. Setting to -1 allows for any length.

Declaration
public int MaxCharacters { get; set; }
Property Value
Type Description
Int32
| Improve this Doc View Source

MaxHorizontalScrollIndex

Maximal allowed horizontal scroll index - depending on HorizontalScrollMode its unit is either in characters or pixels

Declaration
public int MaxHorizontalScrollIndex { get; set; }
Property Value
Type Description
Int32
| Improve this Doc View Source

RowAlignment

Declaration
public HorizontalAlignment RowAlignment { get; set; }
Property Value
Type Description
HorizontalAlignment
| Improve this Doc View Source

RowsDisplayed

Declaration
public int RowsDisplayed { get; set; }
Property Value
Type Description
Int32
| Improve this Doc View Source

RowSpacing

Declaration
public int RowSpacing { get; set; }
Property Value
Type Description
Int32
| Improve this Doc View Source

ScrollIndex

Declaration
public int ScrollIndex { get; set; }
Property Value
Type Description
Int32
| Improve this Doc View Source

SelectedIndex

Declaration
public int SelectedIndex { get; set; }
Property Value
Type Description
Int32
| Improve this Doc View Source

SelectedItem

Declaration
public string SelectedItem { get; }
Property Value
Type Description
String
| Improve this Doc View Source

SelectedShadowColor

Declaration
public Color SelectedShadowColor { get; set; }
Property Value
Type Description
Color
| Improve this Doc View Source

SelectedShadowPosition

Declaration
public Vector2 SelectedShadowPosition { get; set; }
Property Value
Type Description
Vector2
| Improve this Doc View Source

SelectedTextColor

Declaration
public Color SelectedTextColor { get; set; }
Property Value
Type Description
Color
| Improve this Doc View Source

SelectedValue

Declaration
public ListBox.ListItem SelectedValue { get; }
Property Value
Type Description
ListBox.ListItem
| Improve this Doc View Source

ShadowColor

Declaration
public Color ShadowColor { get; set; }
Property Value
Type Description
Color
| Improve this Doc View Source

ShadowPosition

Declaration
public Vector2 ShadowPosition { get; set; }
Property Value
Type Description
Vector2
| Improve this Doc View Source

TextColor

Declaration
public Color TextColor { get; set; }
Property Value
Type Description
Color
| Improve this Doc View Source

TextScale

Declaration
public float TextScale { get; set; }
Property Value
Type Description
Single
| Improve this Doc View Source

VerticalScrollMode

set vertical scroll mode to either character wise or pixel wise

Declaration
public ListBox.VerticalScrollModes VerticalScrollMode { get; set; }
Property Value
Type Description
ListBox.VerticalScrollModes
| Improve this Doc View Source

WrapTextItems

enable wrapping of text items, additional mode for word wrapping can be activated with property WrapWords

Declaration
public bool WrapTextItems { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

WrapWords

enable wrapping of words in text items - Property WrapTextItems must be set to true as well so that this has an effect

Declaration
public bool WrapWords { get; set; }
Property Value
Type Description
Boolean

Methods

| Improve this Doc View Source

AddItem(TextLabel, out ListBox.ListItem, Int32, String)

Declaration
public void AddItem(TextLabel textLabel, out ListBox.ListItem itemOut, int position = -1, string tag = null)
Parameters
Type Name Description
TextLabel textLabel
ListBox.ListItem itemOut
Int32 position
String tag
| Improve this Doc View Source

AddItem(String, out ListBox.ListItem, Int32, Object)

Declaration
public void AddItem(string text, out ListBox.ListItem itemOut, int position = -1, object tag = null)
Parameters
Type Name Description
String text
ListBox.ListItem itemOut
Int32 position
Object tag
| Improve this Doc View Source

AddItem(String, Int32, Object)

Declaration
public void AddItem(string text, int position = -1, object tag = null)
Parameters
Type Name Description
String text
Int32 position
Object tag
| Improve this Doc View Source

AddItems(IEnumerable<TextLabel>)

Declaration
public void AddItems(IEnumerable<TextLabel> labels)
Parameters
Type Name Description
IEnumerable<TextLabel> labels
| Improve this Doc View Source

AddItems(IEnumerable<String>)

Declaration
public void AddItems(IEnumerable<string> items)
Parameters
Type Name Description
IEnumerable<String> items
| Improve this Doc View Source

ClearItems()

Declaration
public void ClearItems()
| Improve this Doc View Source

Draw()

Declaration
public override void Draw()
Overrides
BaseScreenComponent.Draw()
| Improve this Doc View Source

FindIndex(String)

Declaration
public int FindIndex(string text)
Parameters
Type Name Description
String text
Returns
Type Description
Int32
| Improve this Doc View Source

GetItem(Int32)

Declaration
public ListBox.ListItem GetItem(int index)
Parameters
Type Name Description
Int32 index
Returns
Type Description
ListBox.ListItem
| Improve this Doc View Source

HeightContent()

Declaration
public int HeightContent()
Returns
Type Description
Int32
| Improve this Doc View Source

HorizontalScrollLeft()

Declaration
public void HorizontalScrollLeft()
| Improve this Doc View Source

HorizontalScrollRight()

Declaration
public void HorizontalScrollRight()
| Improve this Doc View Source

LengthOfLongestItem()

Declaration
public int LengthOfLongestItem()
Returns
Type Description
Int32
| Improve this Doc View Source

MouseClick(Vector2)

Declaration
protected override void MouseClick(Vector2 clickPosition)
Parameters
Type Name Description
Vector2 clickPosition
Overrides
BaseScreenComponent.MouseClick(Vector2)
| Improve this Doc View Source

MouseDoubleClick(Vector2)

Declaration
protected override void MouseDoubleClick(Vector2 clickPosition)
Parameters
Type Name Description
Vector2 clickPosition
Overrides
BaseScreenComponent.MouseDoubleClick(Vector2)
| Improve this Doc View Source

MouseLeave(BaseScreenComponent)

Declaration
protected override void MouseLeave(BaseScreenComponent sender)
Parameters
Type Name Description
BaseScreenComponent sender
Overrides
BaseScreenComponent.MouseLeave(BaseScreenComponent)
| Improve this Doc View Source

MouseMove(Int32, Int32)

Declaration
protected override void MouseMove(int x, int y)
Parameters
Type Name Description
Int32 x
Int32 y
Overrides
BaseScreenComponent.MouseMove(Int32, Int32)
| Improve this Doc View Source

MouseScrollDown()

Declaration
protected override void MouseScrollDown()
Overrides
BaseScreenComponent.MouseScrollDown()
| Improve this Doc View Source

MouseScrollUp()

Declaration
protected override void MouseScrollUp()
Overrides
BaseScreenComponent.MouseScrollUp()
| Improve this Doc View Source

RemoveItem(Int32)

Declaration
public void RemoveItem(int index)
Parameters
Type Name Description
Int32 index
| Improve this Doc View Source

ScrollDown()

Declaration
public void ScrollDown()
| Improve this Doc View Source

ScrollToSelected()

Declaration
public void ScrollToSelected()
| Improve this Doc View Source

ScrollUp()

Declaration
public void ScrollUp()
| Improve this Doc View Source

SelectIndex(Int32)

Declaration
public void SelectIndex(int index)
Parameters
Type Name Description
Int32 index
| Improve this Doc View Source

SelectNext()

Declaration
public void SelectNext()
| Improve this Doc View Source

SelectNone()

Declaration
public void SelectNone()
| Improve this Doc View Source

SelectPrevious()

Declaration
public void SelectPrevious()
| Improve this Doc View Source

SetRowsDisplayedByHeight()

Declaration
public void SetRowsDisplayedByHeight()
| Improve this Doc View Source

SwapItems(Int32, Int32)

Declaration
public void SwapItems(int indexA, int indexB)
Parameters
Type Name Description
Int32 indexA
Int32 indexB
| Improve this Doc View Source

Update()

Declaration
public override void Update()
Overrides
BaseScreenComponent.Update()
| Improve this Doc View Source

UpdateItem(Int32, String)

Declaration
public void UpdateItem(int index, string label)
Parameters
Type Name Description
Int32 index
String label
| Improve this Doc View Source

UseSelectedItem()

Declaration
public void UseSelectedItem()
| Improve this Doc View Source

WidthContent()

Declaration
public int WidthContent()
Returns
Type Description
Int32

Events

| Improve this Doc View Source

OnScroll

Declaration
public event ListBox.OnScrollHandler OnScroll
Event Type
Type Description
ListBox.OnScrollHandler
| Improve this Doc View Source

OnSelectItem

Declaration
public event ListBox.OnSelectItemEventHandler OnSelectItem
Event Type
Type Description
ListBox.OnSelectItemEventHandler
| Improve this Doc View Source

OnSelectNext

Declaration
public event ListBox.OnSelectNextEventHandler OnSelectNext
Event Type
Type Description
ListBox.OnSelectNextEventHandler
| Improve this Doc View Source

OnSelectPrevious

Declaration
public event ListBox.OnSelectPreviousEventHandler OnSelectPrevious
Event Type
Type Description
ListBox.OnSelectPreviousEventHandler
| Improve this Doc View Source

OnUseSelectedItem

Declaration
public event ListBox.OnUseSelectedItemEventHandler OnUseSelectedItem
Event Type
Type Description
ListBox.OnUseSelectedItemEventHandler
  • Improve this Doc
  • View Source
In This Article
  • Constructors
    • ListBox()
  • Properties
    • AlwaysAcceptKeyboardInput
    • Count
    • EnabledHorizontalScroll
    • Font
    • HorizontalScrollIndex
    • HorizontalScrollMode
    • ListItems
    • MaxCharacters
    • MaxHorizontalScrollIndex
    • RowAlignment
    • RowsDisplayed
    • RowSpacing
    • ScrollIndex
    • SelectedIndex
    • SelectedItem
    • SelectedShadowColor
    • SelectedShadowPosition
    • SelectedTextColor
    • SelectedValue
    • ShadowColor
    • ShadowPosition
    • TextColor
    • TextScale
    • VerticalScrollMode
    • WrapTextItems
    • WrapWords
  • Methods
    • AddItem(TextLabel, out ListBox.ListItem, Int32, String)
    • AddItem(String, out ListBox.ListItem, Int32, Object)
    • AddItem(String, Int32, Object)
    • AddItems(IEnumerable<TextLabel>)
    • AddItems(IEnumerable<String>)
    • ClearItems()
    • Draw()
    • FindIndex(String)
    • GetItem(Int32)
    • HeightContent()
    • HorizontalScrollLeft()
    • HorizontalScrollRight()
    • LengthOfLongestItem()
    • MouseClick(Vector2)
    • MouseDoubleClick(Vector2)
    • MouseLeave(BaseScreenComponent)
    • MouseMove(Int32, Int32)
    • MouseScrollDown()
    • MouseScrollUp()
    • RemoveItem(Int32)
    • ScrollDown()
    • ScrollToSelected()
    • ScrollUp()
    • SelectIndex(Int32)
    • SelectNext()
    • SelectNone()
    • SelectPrevious()
    • SetRowsDisplayedByHeight()
    • SwapItems(Int32, Int32)
    • Update()
    • UpdateItem(Int32, String)
    • UseSelectedItem()
    • WidthContent()
  • Events
    • OnScroll
    • OnSelectItem
    • OnSelectNext
    • OnSelectPrevious
    • OnUseSelectedItem
Back to top Generated by DocFX