Coolbar's child backcolor

I've placed a listbox as a child in a coolbar's band and changed the listbox's backcolor to black.
It becomes black at design time, but appears white at running time.
The same problem occurs with the forecolor that i can't set to anything else than black.
How can i have the listbox's backcolor and forecolor changed at running time ?
Who is Participating?
HATCHETConnect With a Mentor Commented:

I haven't worked a lot with the CoolBar control because there are some problems with it that I've found on redistribution.  I messed around with it for your question and found the same thing!  Very odd.  When you put a standard ListBox control into the CoolBar either before or after you change it's color, it defaults back to white inside of the CoolBar and you can't change it's BackColor property at Run Time.

Here's the solution :  Press <CTRL> + T ... this will bring up the "Components" dialog.  Select "Microsoft Forms 2.0 Object Library" which is part of the FM20.DLL.  Once this is added, you'll notice that it gives you a whole new set of controls to work with similar to the original default controls.  These are "Updates" to the defaults.  You'll notice that one of the controls is a "ListBox".  Use this instead of the default ListBox.  It has a lot more options and is more robust.  I've tried it, and it WILL allow you to change it's BackColor property once made into a child of the CoolBar either at design time, or at run time... and it STICKS!    =]

Hope that helps.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.