View Issue Details

IDProjectCategoryView StatusLast Update
0029237LazarusLCLpublic2015-12-23 15:27
Reporterwp Assigned ToOndrej Pokorny  
Status closedResolutionfixed 
Product Version1.7 (SVN) 
Fixed in Version1.7 (SVN) 
Summary0029237: r50847 broke grid's RowSelect behavior
DescriptionThis report is for a stringgrid for which the option goRowSelect is set.

Using r50621 the RowSelect option behaves correctly when a cell is in edit mode: the texts of all cells of the row containing the edited cell are visible.

After the next changes of grids.pas, r50847, only the edited cell is visible, the text in the other cells of the same row is not visible - presumably it is painted in white on the white background because after a cell in another row is focused the hidden cells come back.

There has been a series of modifications of the grids unit upon r50621, but the reported behavior is still valid until the current revison.
Steps To ReproduceThe attached demo contains a stringgrid with some standard texts in each cell. The grid has the options goEditing and goRowSelect set.

Select the top-left cell ("A1") and press "F2": The cell goes into edit mode, but the other cells in the 1st row disappear.

Select cell A2: The hidden cells come back. Press "F2": now the cells in the 2nd row disappear.

This behavior is valid for all revisions after r50621. In r50621, the grid behaves normally.

See attached screen shots - file names identify revisions used for compiling.
TagsNo tags attached.
Fixed in Revision51005
Attached Files



2015-12-22 20:17

developer (1,914 bytes)


2015-12-22 20:32


r50992.png (18,059 bytes)   
r50992.png (18,059 bytes)   


2015-12-22 20:33


r50621.png (18,360 bytes)   
r50621.png (18,360 bytes)   


2015-12-23 00:11


grids.pas.patch (812 bytes)   
Index: lcl/grids.pas
--- lcl/grids.pas	(revision 2)
+++ lcl/grids.pas	(working copy)
@@ -3586,12 +3586,12 @@
     Canvas.Pen.Mode := pmCopy;
     GetSelectedState(aState, IsSelected);
     if IsSelected then begin
-      if FEditorMode and (FEditor<>nil)
+      if (FCol=aCol) and FEditorMode and (FEditor<>nil)
       and (((FEditor=FStringEditor) and (FStringEditor.BorderStyle=bsNone))
          or (FEditor=FButtonStringEditor))
         Canvas.Brush.Color := FEditor.Color
-      else if FEditorMode and (FEditor=FPicklistEditor) then
+      else if (FCol=aCol) and FEditorMode and (FEditor=FPicklistEditor) then
         Canvas.Brush.Color := GetNotSelectedColor
         Canvas.Brush.Color := SelectedColor;
grids.pas.patch (812 bytes)   


2015-12-23 00:11

reporter   ~0088186

Possible fix in grids.pas.patch

Ondrej Pokorny

2015-12-23 12:51

developer   ~0088193

abonic1 - sorry, haven't seen your patch ;)



2015-12-23 15:27

developer   ~0088194


Issue History

Date Modified Username Field Change
2015-12-22 20:16 wp New Issue
2015-12-22 20:17 wp File Added:
2015-12-22 20:19 wp Description Updated View Revisions
2015-12-22 20:20 wp OS => Windows
2015-12-22 20:20 wp OS Version => Win 7
2015-12-22 20:20 wp Platform => x86
2015-12-22 20:23 wp Steps to Reproduce Updated View Revisions
2015-12-22 20:32 wp File Added: r50992.png
2015-12-22 20:33 wp File Added: r50621.png
2015-12-22 20:34 wp Steps to Reproduce Updated View Revisions
2015-12-23 00:11 abonic1 File Added: grids.pas.patch
2015-12-23 00:11 abonic1 Note Added: 0088186
2015-12-23 12:44 Ondrej Pokorny Assigned To => Ondrej Pokorny
2015-12-23 12:44 Ondrej Pokorny Status new => assigned
2015-12-23 12:50 Ondrej Pokorny Fixed in Revision => 51005
2015-12-23 12:50 Ondrej Pokorny LazTarget - => 1.6
2015-12-23 12:50 Ondrej Pokorny Status assigned => resolved
2015-12-23 12:50 Ondrej Pokorny Fixed in Version => 1.7 (SVN)
2015-12-23 12:50 Ondrej Pokorny Resolution open => fixed
2015-12-23 12:51 Ondrej Pokorny Note Added: 0088193
2015-12-23 15:27 wp Note Added: 0088194
2015-12-23 15:27 wp Status resolved => closed