I’m using StyleGrid which is not compatible with more recent Xojo versions,
and has some limitations on functionality.
Anyone know of a control or way to implement a grid control that can do all of the following:
- freeze the header row when you scroll down
- freeze cols when you scroll to the right
- allows you to hide and unhide cols
- allows you to add COLOR to individual headings, cols, or rows
@Tim Turner I thought I had replied before. My mistake.
You could write your own.
Scott Boss is right I’m afraid.
Many people would like one. Make one and sell it for big bucks!
[quote=307824:@Tim Turner]freeze the header row when you scroll down
freeze cols when you scroll to the right
allows you to hide and unhide cols
allows you to add COLOR to individual headings, cols, or rows[/quote]
I never used anything but subclasses of ListBox, but seems to me some of the features you list are already in plain old ListBox :
- The header does not move with vertical scroll
- Hiding columns is as easy as setting their width to zero
- Columns and rows can be painted with CellPaint
It is not that difficult to replace the heading with your own with Canvas and paint it however you want. Dave S has done just that.
Freezing columns upon horizontal scroll is another matter. It seems possible with a canvas receiving a drawInto of the listbox, placed on top of it.
And the purpose of that is to color the heading because Listbox does not let you do that? Or did I misunderstand?
What if you place another listbox on top with just the 2 or 3 cols that need to stay frozen? And the width is set to align to the same cols on the one underneath… then it might “appear” as if the cols are frozen as you scroll right but they are really just riding on top of the real listbox??? Or would that not work as soon as you click on the other listbox underneath.
Have a look at DataView by PiDog.com
It has all of your requirements and more.
Yes, the ListBox does not have any settings to change colors on the heading.
I wish Dave was around, I could not locate his custom header.
That would work just fine. But it would be more undertaking.