[IronPython] WPF Question
curt at hagenlocher.org
Sat May 3 04:46:55 CEST 2008
If you add strings to the Items collection, then SelectedItem will contain
strings. If you want the ListBoxItem, you have to do something like this:
This is true for both VB and IronPython because it's a function of the WPF
On Fri, May 2, 2008 at 12:49 PM, Davy Mitchell <daftspaniel at gmail.com>
> First - yay a new release well done ;-)
> Now a WPF Question...
> I am using a listbox and in VB.net used TheLisbox.SelectedItem.Content to
> get the string selected.
> Try this with IronPython (and after an impressively long traceback) the
> error is 'AttributeError: 'str' object has no attribute 'Content''.
> So IP has converted the 'Object' of SelectedItem straight to a string -
> handy for me but shouldn't it be a ListBoxItem?
> Davy Mitchell
> Blog - http://www.latedecember.co.uk/sites/personal/davy/
> Twitter - http://twitter.com/daftspaniel
> Skype - daftspaniel http://needgod.com
> Users mailing list
> Users at lists.ironpython.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ironpython-users