more than one color in a list box

more than one color in a list box

Post by Paul Lehm » Sat, 18 Dec 1999 04:00:00



Is there some way to create a list box/combo box so that the font
color of each item is different?

It seems like this should be easy to do, but I have no idea how.

Thanks.

 
 
 

more than one color in a list box

Post by Jim in Clevelan » Sat, 18 Dec 1999 04:00:00



> Is there some way to create a list box/combo box so that the font
> color of each item is different?

> It seems like this should be easy to do, but I have no idea how.

All depends on whether you consider writing your own control to be
"easy" ;-)
--
Jim in Cleveland
If you're writing to me, in my address
change "REAL_Address.see.below" to "worldnet.att.net"

"What's so funny 'bout peace, love & understanding?"
     - Nick Lowe

 
 
 

more than one color in a list box

Post by Paul Lehm » Thu, 23 Dec 1999 04:00:00


Quote:>All depends on whether you consider writing your own control to be
>"easy" ;-)
>--

When you consider where I am on the VB learning curve, I suspect the
Red Sox will have won the World Series by the time I figure out how to
write my own control.  You wouldn't happen to know where I may be able
to download  such a control? (Yes,  realize I may have to pay for my
sloth and ignorance.)
 
 
 

more than one color in a list box

Post by Jim in Clevelan » Thu, 23 Dec 1999 04:00:00



> >All depends on whether you consider writing your own control to be
> >"easy" ;-)
> >--

> When you consider where I am on the VB learning curve, I suspect the
> Red Sox will have won the World Series by the time I figure out how to
> write my own control.  You wouldn't happen to know where I may be able
> to download  such a control? (Yes,  realize I may have to pay for my
> sloth and ignorance.)

Paul,
  Ya know I'm from Cleveland, so I can commisserate with ya on the World
Series thing.  No I don't know of any available but then I haven't
looked.  Last time I scoffed at a guy who wanted a control (a data-bound
pair of option buttons), I ended up writing one for a project a couple
months later.
  So lemme ask ya a few things:  in a list box would you want the items
to alternate in color (one row red, next blue, next red, next blue...).
Or more than two colors?  There's gonna be a limit, maybe the 7 VB color
constants (excluding white).  Would you want to be able to set control
properties so you could pick the number of colors, and which colors,
when you set up the control at design time?  Anything else you consider
essential other than those issues?  Other than the font colors, the
control should behave like a normal ListBox, right?  I might play around
and see what I can do over the holidays some time.
--
Jim in Cleveland
If you're writing to me, in my address
change "REAL_Address.see.below" to "worldnet.att.net"

"What's so funny 'bout peace, love & understanding?"
     - Nick Lowe