What is the row number of the header row of a listbox?
If I want to paint the background of the header row I need a cell row and column… column is easy… but what row?
The header is not a row and does not have a row number. As explained in many forum posts, if you want to do anything fancy with the header, you will need to put a canvas over that area and draw color and text yourself.
Or my preference, switch from Xojo Listbox to piDog DataView which exposes LOTS more features. Including numerous header events including paint events. One could argue it is overkill for just wanting header paint events. I first got it for several other features, but I keep running into situations where I appreciate all the extra stuff I am picking up at the same time.
I achieve this effect by stacking a 1 row listbox on top of my content listbox:
In the design mode:
I would want to be able to sort by clicking in the header cell, and to have the same ability as a listbox has to adjust the column widths by dragging the header separators.
You can do all that by getting the CellClick in the header and then calling Sort in the content listbox. That’s what I do. Same with sizing. That snap snapshot just didn’t show that layout.