From: jp Date: Sat, 27 Feb 2016 10:56:36 +0000 (+0100) Subject: test selectedIndex<0 in listbox X-Git-Tag: v0.4~112 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=04fa15edebb733e4b7488063767f08ad2fa4d492;p=jp%2Fcrow.git test selectedIndex<0 in listbox --- 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 {