TwwdbGrid and styles
We use the Twwdbgrid extensively and want to add styles to our 10.4.2 application. When we use and ownerdraw event on the grid the cursor does not appear to respect the style color etc. A normal TDBGrid looks ok.
Could someone confirm this and offer a fix or patch.
Thanks
Tony
-
This was answered via email, but here is the answer in case someone else runs into this.
I believe you can accomplish this through the OnBeforeDrawCell and OnAfterDrawCell. You can disable any default painting (so it won’t override your painting) using the OnBeforeDrawCell event by setting the
For instance…
drawcellinfo.DefaultDrawContents:= false;
By not assigning it, then it will still paint the default contents after the event returns. You can place your other painting in the OnBeforeDrawCell event.
If you want to paint something additional after the default painting you can use the OnAfterDrawCell.
Please sign in to leave a comment.
Comments
1 comment