Unpredictably it may be necessary to run "panel.DoLayout(true)" to show some items that otherwise would stay hidden, even if the scroll bar appeared. This uncertainty make the control not much robust, so I would avoid using this control for any new code, but it helped me fixing some legacy code. Also "BeginInit()" and "EndInit()" methods do nothing (see sources, the variable "initialising" is never checked anywhere). Possibly they were supposed to avoid layout operations while adding several items.
Hi the control seems great, but I am experiencing weird bugs, I have a 6 images in an imagelist and they are assigned to the panel at design time, it looks all fine at first, then in the IDE designer, as soon as I double click an MozItem and write some code (VB) in the 'click' handler the IMAGE of this item has changed to another image in the imagelist, clearing the imagelist property of the panel and reattaching it fixes the desginer but the running application pulls wrong images now...something is wrong, will experiment further
anyone able to recreate this problem ?
Go into the properties for the MozPanel and remove your imagelist form the ImageList property. Then re-add it. This may have been caused by the way I added this control to my project. I simply set a reference and copied the populated control from another project.
Yes, by my exprience this bug is caused by setting a MozItem's Image directly, via the properties of the MozItem itself, rather than through the mozPane's Items(Collection) list.
Try to stick to only setting MozItem's Images through their parent panel, rather than through the properties of the actual MozItem and everything should be fine.
Hi there, great control. I've been working on my own control, and haven't been able to remove the border for the image that's drawn in the PaintValue function. (You have an image in the article where the preview in the grid control (the soccer ball) has a black border around it)
Good work. Just yesterday I created a (simpler) control like that.
My idea was to create a control with the same functionality, but
the styles should be more flexible.
The height of the items should not depend on the contents.
E.g. I would like to have items without images (ItemStyle=Text) with
an height of 100. It should be possible to set an arbitrary height for
all items, with or without image.
There should be an additional alignment "center". Assume the image
of on item is not set while other items found their images and the TextAlign
is set to Bottom... that looks not very nice. It would be better to align
the text in the center of the item (which has - of course - the same height
like the other ones).
Why the dependency on an imagelist? I would like to set the images directly.
Often the use of an imagelist is just overhead.
Ok, enough. If you're interested in, I have some more ideas.
None the less, good control, I stopped to work on mine.