TAdvGlowButton - Image redraw issue.

I have several forms that contain multiple AdvGlowButtons on a Panel. The button positions are fixed and the Form is Sizeable.

If I reduce the width of the form by dragging the right hand side, the buttons are gradually hidden. However when I drag the width back to its original position, the button images are not refreshed correctly and now contain a load of black vertical lines.

If I "Invalidate" every button in the FormResize event the problem goes away. But I have a lot of buttons and this seem like a bodge to solve the problem.



The Button images are contained in an ImageList, just in case that makes a difference.



Is this something that can be fixed?

It is unclear what is causing this. I cannot see this happening here.

Can you perhaps start by revising your DoubleBuffered settings and see if it makes a difference when you turn this off on form and container controls.

Ok, here are some more clues which may let you off the hook.



The buttons are placed on an ElPack Panel and the buttons are set to be Transparent.

If I set the buttons to be not Transparent, the problem goes away.



If I put the buttons on a TAdvPanel, again the problem has gone away regardless of the button transparency.



So it looks like an incompatibility between the two.



The Double Buffered property did not make any difference.



I am in the process of updating my project and there are a lot of ElPack components. Looks like I will have to change the Panels as well.





For transparency, we need to send a paint update message to the container control. It could be the ElPack Panel component isn't responding correct this to paint update message from our transparent button.

Quite likely. It did work with the ElPack Graphic Button, but as I am changing all the buttons in my application, I shall change the Panels as well.



One useful feature that the ElPack Graphic button had was that you could specify a separate ImageList for the button when it was in the Down state. By not having this, I assume I have to adjust the ImageIndex in the Button OnClick event. Not a problem, just extra work.



Thanks for you ongoing support.

Graham

At this time, we do not have a separate image for the down state.
This is an interesting suggestion that we'll consider. A workaround is indeed to change the ImageIndex from the OnClick event for now.