SelectBox Values Property Delta Engine Documentation

Namespace: DeltaEngine.Scenes.Controls
Assembly: DeltaEngine.Scenes (in DeltaEngine.Scenes.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public List<Object> Values { get; set; }

Property Value

Type: List Object 
Remarks

Tests: DeltaEngine.Scenes.Tests.Controls.SelectBoxTests
Examples

5 unit tests call DeltaEngine.Scenes.Controls.SelectBox.Values
[Test]
public void RenderSelectBoxWithThreeValuesAndThreeLines()
{
    var text = new FontText(Font.Default, "", new Rectangle(0.4f, 0.7f, 0.2f, 0.1f));
    selectBox.LineClicked += lineNo => text.Text = selectBox.Values[lineNo] + " clicked";
}
[Test]
public void RenderSelectBoxWithTenValuesAndThreeLines()
{
    SetToTenValues();
    var text = new FontText(Font.Default, "", new Rectangle(0.4f, 0.7f, 0.2f, 0.1f));
    selectBox.LineClicked += lineNo => text.Text = selectBox.Values[lineNo] + " clicked";
}
[Test]
public void RenderSelectBoxAttachedToMouse()
{
    selectBox.Values = new List<object> { "value 1", "value 2", "value 3", "value 4" };
    new Command(
        point => selectBox.DrawArea = Rectangle.FromCenter(point, selectBox.DrawArea.Size)).Add(
            new MouseMovementTrigger());
}
See Also