From 04fa15edebb733e4b7488063767f08ad2fa4d492 Mon Sep 17 00:00:00 2001 From: jp Date: Sat, 27 Feb 2016 11:56:36 +0100 Subject: [PATCH] test selectedIndex<0 in listbox --- src/GraphicObjects/ListBox.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GraphicObjects/ListBox.cs b/src/GraphicObjects/ListBox.cs index 4a188200..0d80479a 100644 --- a/src/GraphicObjects/ListBox.cs +++ b/src/GraphicObjects/ListBox.cs @@ -93,7 +93,7 @@ namespace Crow } } public object SelectedItem{ - get { return data == null ? "none" : data[_selectedIndex]; } + get { return data == null ? null : _selectedIndex < 0 ? null : data[_selectedIndex]; } } [XmlAttributeAttribute]//[DefaultValue(null)] public IList Data { -- 2.47.3