aewarnick Posted October 11, 2003 Posted October 11, 2003 (edited) My MB (custom messageBox) never shows! protected override void AddItemsCore(object[] o) { a.MB.ShowDialog(o.GetType()); if(o.GetType() == typeof(FileLBItem)) this.Items.Add(o); return; } protected override void SetItemsCore(IList o) { a.MB.ShowDialog(o.GetType()); if(o.GetType() == typeof(FileLBItem)) this.Items.Add(o); return; } protected override void SetItemCore(int i, object o) { a.MB.ShowDialog(o.GetType()); if(o.GetType() == typeof(FileLBItem)) this.Items.Add(o); return; } I am trying to check if the Item that is added to the listbox is of a certain type before I add it. But none of these methods do anything at all. I know I didn't call the base methods in the code above but I do have it in my code here at home. Is there any way to check the items BEFORE they are added to the ListBox? Edited October 11, 2003 by aewarnick 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.