Hi,
I have a ImageList containing 4 bitmaps attached to a UserControl
which acts as a Open/Close panel.
This panel, upon click, switches the image in a PictureBox control to
indicate the current panel status (Open/Close).
Problem is that in certain complex scenarios the images disappear!
from the ImageList. That is, when I call: imageList.Images[1], I get
the exception: Specified argument was out of the range of valid
values.
Parameter name: '1' is not a valid value for 'index'. And when I check
the length of the Images collection it turns out to be zero :-(
I have a faint clue regarding the cause of this problem - it may have
something to do with the visibility of the UserControl containing the
ImageList.
Has anyone seen something like that before?