Eric,
Thanks for your reply I tried the Count property even though it doesn't show in intellisense and it worked. I guess the lesson is: don't trust what intellisense says 100%.
Thanks,
Einar
>Even if the Count property does not appear in the intellisense, the Count property is existing in the Panels collection and it returns the right number!
>
>If you look into the Object Browser, you will find the Count property dimmed for the System.Windows.Forms.StatusBar.StatusBarPanelCollection collection.
>
>
>>Einar,
>>
>>It doesn't seem that the StatusBar object has an itemcount...I looked for StatusBar.Panels.Count and other things, and didn't come across any.
>>
>>I'm going to check again and also look it up, because I'm a little surprised that a particular collection doesn't have a count prop, but I believe this should work for now...
>>
>>
>>int nCount = 0;
>>foreach(object oo in this.statusBar1.Panels)
>> nCount++;
>>
>>
>>Kevin
Semper ubi sub ubi.