Control Set Background Paint

I’m creating a control set of listboxes. I can easily set the one I want to highlight using Listbox(i).SetFocus.

I know I can set the color on an individual listbox using CellBackgroudPaint. How do you do the same with a control set?

a control set of listboxes?
use the CellBackgroundPaint event of each member of the control set.
The only differnece between a single instance and a control set instance is the control set instance has an INDEX parameter, which you can ignore if you want ALL members dealt with in the same manner

What I can’t figure out is how or where to set the index.

You don’t set it…
When used in a control set, the EVENT (CellPaintBackground) provides the index to the controlset member that the event is about to affect…

If you wish to FORCE it, use one of the INVALIDATE methods (read the LR about listboxes), this will cause it to call the event(s) for which ever listbox you issue the invalidate method on

I added a property to my window called LBHighLight and changed the CellPaintBackground to:
if index =LBHighlight then
g.ForeColor = &cC3FFF2
g.FillRect(0, 0, g.Width, g.Height)

It works perfectly after setting LBHighlight in my open event.

Your insights were a great help.