aewarnick Posted April 10, 2003 Posted April 10, 2003 Ms says the listbox.SelectedItems returns a SelectedObjectCollection but this does not work: SelectedObjectCollection x= this.listBox.SelectedItems; What am I doing wrong? The compiler does not know what a SelectedObjectCollection is. Quote C#
*Gurus* divil Posted April 10, 2003 *Gurus* Posted April 10, 2003 You want ListBox.SelectedObjectCollection, not just SelectedObjectCollection. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
aewarnick Posted April 10, 2003 Author Posted April 10, 2003 That works but it did not show up in the context menu as an auto complete. Even when I use System.Windows.Forms.ListBox it does not show up. Also, I cannot use x.Length to reference each object in the collection and there is no context menu at all when I press x then a dot. Do I need a reference or something? Quote C#
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.