Transparent Listbox

Mar 11, 2009 at 10:22 PM
I have created a panel that contains a listbox. I have 'painted' a picture on the panel, and want the listbox to be transparent so that all that can be seen is the text. I have played around with it as much as I can think, and nothing I have tried seems to work.

I have tried setting the BackColor to be transparent, both through the Color.Transparent (which I wasn't expecting to work), and through the ColorConverter tool. Have also tried playing around with the OnPaint and OnPaintBackground methods, neither of which have worked. I am doing it fine with all other controls, I'm only having issues with the FluidListBox.

Any help you can offer would be greatly appreciated.

Thanks,


ScottIsAFool
Mar 18, 2009 at 6:05 AM
I tried to see what I could get with this and if I change the backcolor to any color it would display the listbox in that color. If I selected color empty or transparent it would just come up white. It seems to me that you would need to add the functionality of the listbox since windows mobile currently does not do transparent on its own. If you do a search for transparent listbox on the web you will find code out there that may help you do this. I think you will have to follow what the other controls do and set the backcolor to magenta and then make it use that as the color to make transparent as these controls use magenta as the transparent color. I had to work with this to make buttons come out right for me.

Walter
Mar 23, 2009 at 11:47 AM
I have played around with using the transparentBrush method used in the buttons and such, but whenever i try it, I always only end up with a black background. Unfortunately the FluidListbox control doesnt inherit from the normal Listbox, so I couldn't go down that method to try and send a message to the listbox control. I'm still hopeful that it can be done, and I may have to spend a day or two dedicated to try and work it out. Not sure if the dev has any thoughts on this..?