Drawing glitch with TStringGrid lazarus / 31-LCL ---------------------------------------------------------------------- Henppy · 2014-01-03 21:27 Hi all. First of all, sorry if this has been asked before, I just couldn't come up with a good search term for this problem. I'm having this "glitch" with a TStringGrid component. There's this grid on a form. There is no code right now, no custom draw or anything, just dropped the thing there and changed the fixed row/col count and columns. (please see attachment). But the last row gets this "line" from the control below and the color from the background (a synedit component with dark gray color) in the parent form. Any ideas what's happening? ---------------------------------------------------------------------- Mike.Cornflake · 2014-01-03 23:37 Wierdliness.  What version of Lazarus/FPC are you using?    And any chance you can post the .pas file and .lfm file? ---------------------------------------------------------------------- Henppy · 2014-01-04 00:29 Sorry, I forgot post that info... again. This is Lazarus 1.0.14 with FPC 2.6.2. 64 bits. I tried compiling in Win7 64 bits, WinXP 32 (VM) and Linux Mint (Cinnamon) 64 bits (VM). It looks fine in Linux, but bad on Windows. Hmmm... Strage, I didn't notice it before because of the colors, but it happens in the IDE too, sometimes when I press F12 to bring the form up, that last row will show parts of what is underneath. Here's the code if you want to take a look at it: https://dl.dropboxusercontent.com/u/70266302/sat28.zip That particular form is in the uCodeTemplates unit. BTW, calling repaint doesn't fix the problem. ---------------------------------------------------------------------- Mike.Cornflake · 2014-01-04 00:47 The fact that the drawing issue occurs in the IDE confirms it's a StringList StringGrid bug.  Happens on my system too.  also Win 7 Win 8, 64its.  SVN Laz. I'm looking at your code now, see if I can identify which property is the culprit, after that I'll check on MantraMantis, see if it's a known or not... UPDATE:  Definitely a drawing issue.  The affected region is one scrollbar high.  If I turn scrollbars off, or increase the width of the control by the width of a vertical scrollbar, then the issue goes away.  Appears to have something to do with the widths of your columns being very close to the width of the control.  Worth noting that at no time did I run the code, simply made changes in the IDE, closed the form, then reopened it. Nothing comes up on a Bugtracker search of "TStringlist paint".    Looks like a bug report should be raised. UPDATE2:  In terms of a short term fix to your problem, try On FormShow, set the StringList StringGrid width to 500, then back to 448.   A hack, but works on my system.   Not thoroughly tested :-) UPDATE 3:  Sigh.  Nothing relevant appears to come up on a more relevant bugtracker search of "TStringGrid Paint" either ---------------------------------------------------------------------- Mike.Cornflake · 2014-01-04 01:36 Submitted on Mantis http://mantis.freepascal.org/view.php?id=25489 ---------------------------------------------------------------------- Henppy · 2014-01-04 02:37 So it looks like a real bug? Much appreciated, Mike. ---------------------------------------------------------------------- Mike.Cornflake · 2014-02-06 08:00 If you have a look on the bug report, you'll see that this issue has been solved (and was in fact solved quite quickly, the delay in reporting here was due to me and other commitments).  No idea which release of Laz will see the fix.