Is there a way to center the Heading on a listbox and is there a way to change the background color of the heading cell only, I have tried the following but it changes the cell under the heading.
if row = 0 then
g.ForeColor = rgb(225,100,125)
else
g.ForeColor = RGB(255,255,255)
end if
g.FillRect 0,0,g.Width,g.Height
I am trying to use your listbox header and the fields are being overwritten within the visible area of my listbox and not the full width of the control. Any tips on fixing this?
The “Folder” and “Parent” columns are the last of the 10 field in my listbox and should be off the screen.
I am trying to use your listbox header and the fields are being overwritten within the visible area of my listbox and not the full width of the control. Any tips on fixing this?
The “Folder” and “Parent” columns are the last of the 10 field in my listbox and should be off the screen.
Not sure… The only change I have made to that code in years is to suggest that a line similar to this be added int the CELLBACKGROUNDPAINT event of the actual listbox
If theHEADER.hdr_scrollpositionX<>Me.ScrollPositionX Then theHEADER(0).Refresh
I discovered that it didn’t synch when the listbox scrolled left to right.
other than that I use that control ALOT… as a matter of my current project (TADPOLE) has about 1/2 dozen instances
You DO need to make sure of these things
do the ATTACH in the LISTBOX.OPEN event
don’t add the header columns until AFTER you have attached it