View Issue Details

IDProjectCategoryView StatusLast Update
0024653LazarusLCLpublic2021-01-23 10:21
ReporterK155LA3 Assigned ToJesus Reyes  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
OSWindows7; Windows XP 
Product Version1.0.8 
Summary0024653: TStringGrid border bug in flat mode
DescriptionHello.

If property RowCount of StringGrid set as 0, then color of StringGrid border will change to grid color.

Sorry, for my bad english.
Steps To Reproduce1 Place StringGrid to form.
2 Change property Flat in object inspector to True.
3 Change property RowCount in object inspector to 0.
Additional InformationI'm added in lcl\grids.pas TStringGrid class description, section published some property:

    //Border color, can changed in object inspector
    property BorderColor;
    //Grid color, can changed in object inspector
    property GridLineColor;

and set color as i need.
TagsNo tags attached.
Fixed in Revision
LazTarget-
WidgetsetWin32/Win64
Attached Files

Activities

K155LA3

2013-06-24 22:04

reporter  

TStringGridBorderBug.png (10,710 bytes)   
TStringGridBorderBug.png (10,710 bytes)   

K155LA3

2013-06-24 22:15

reporter   ~0068504

Last edited: 2013-06-24 22:15

View 2 revisions

Sorry, in Steps To Reproduce must be:
3 Change property FixedRows in object inspector to 0.

Vojtech Cihak

2013-06-24 23:13

reporter   ~0068505

So it has nothing to do with RowCount. I can reproduce on Qt.

K155LA3

2013-06-25 15:56

reporter   ~0068516

Sorry, must be "FixedRows"

Bart Broersma

2013-06-26 12:46

developer   ~0068554

Maybe related to 0022351 ?

K155LA3

2013-06-26 22:16

reporter   ~0068573

In Lazarus-1.1-41901-fpc-2.6.2-20130626-win32 work correctly, border color not chaged. Tested in Windows 7 Rus, Windows XP Rus.

K155LA3

2013-08-09 17:08

reporter  

StringgridBorder.png (93,801 bytes)   
StringgridBorder.png (93,801 bytes)   

K155LA3

2013-08-09 19:48

reporter   ~0069307

Last edited: 2013-08-09 19:54

View 3 revisions

Lazarus-1.1-42338-fpc-2.7.1-20130805-win32. Bug is present in two cases:
1 Multi col and row grid with one fixed col.
2 Multi row and one col grid with one fixed row.
and if app window moved beyond the screen edge and return to screen then border broken in all sgtinggrid.

Temporarily, a strange solution (draw border all stringgrid combination correctly and not broken when app window moved beyond the screen edge):

procedure TCustomGrid.DrawBorder;
...
      Pen.Width := 0; //It is too strange, but it work. Why it work? I'm don't know.
      Pen.Width := 1;
...

"Pen.Width := 0;" may be replaced by guaranteed any state pen change:

Pen.Style := psClear;
Pen.Style := psSolid;

or

Pen.Color := clNone
Pen.Color := fBorderColor;

and etc.

P.S.: If in procedure "TCustomGrid.DrawRow(aRow: Integer)" "Draw Fixed Columns" code place before "Draw columns in this row" then "multi col and row grid with one fixed col" border draw correctly (but still broken by screen edge).

K155LA3

2013-08-09 19:48

reporter  

StringGridBrokenBorder.png (41,663 bytes)   
StringGridBrokenBorder.png (41,663 bytes)   

Jesus Reyes

2021-01-22 22:32

developer   ~0128494

reported as fixed in the meantime

K155LA3

2021-01-23 10:21

reporter   ~0128500

The problem has been resolved.

Issue History

Date Modified Username Field Change
2013-06-24 22:04 K155LA3 New Issue
2013-06-24 22:04 K155LA3 File Added: TStringGridBorderBug.png
2013-06-24 22:15 K155LA3 Note Added: 0068504
2013-06-24 22:15 K155LA3 Note Edited: 0068504 View Revisions
2013-06-24 23:13 Vojtech Cihak Note Added: 0068505
2013-06-25 09:14 Zeljan Rikalo Assigned To => Jesus Reyes
2013-06-25 09:14 Zeljan Rikalo Status new => assigned
2013-06-25 15:56 K155LA3 Note Added: 0068516
2013-06-26 12:46 Bart Broersma Note Added: 0068554
2013-06-26 22:16 K155LA3 Note Added: 0068573
2013-08-09 17:08 K155LA3 File Added: StringgridBorder.png
2013-08-09 19:48 K155LA3 Note Added: 0069307
2013-08-09 19:48 K155LA3 File Added: StringGridBrokenBorder.png
2013-08-09 19:53 K155LA3 Note Edited: 0069307 View Revisions
2013-08-09 19:54 K155LA3 Note Edited: 0069307 View Revisions
2013-10-07 19:35 Jesus Reyes Project Packages => Lazarus
2021-01-22 22:32 Jesus Reyes Status assigned => resolved
2021-01-22 22:32 Jesus Reyes Resolution open => fixed
2021-01-22 22:32 Jesus Reyes LazTarget => -
2021-01-22 22:32 Jesus Reyes Widgetset Win32/Win64 => Win32/Win64
2021-01-22 22:32 Jesus Reyes Note Added: 0128494
2021-01-23 10:21 K155LA3 Status resolved => closed
2021-01-23 10:21 K155LA3 Note Added: 0128500