View Issue Details

IDProjectCategoryView StatusLast Update
0036059LazarusOtherpublic2019-09-09 19:16
ReporterHenri MaquoiAssigned To 
PrioritynormalSeverityminorReproducibilityalways
Status feedbackResolutionopen 
Product Version2.0.4Product Build 
Target VersionFixed in Version 
Summary0036059: Function BitBtnClick ends with parent window's closing
DescriptionThis kind of code works quite well but.. ends closing the parent window!

procedure TFormDisplay.BtnGreyToColorClick(Sender: TObject);
Var
  I, J, MinX, MinY, MaxX, MaxY, Colour, ColRef, Count,
  R, G, B: Integer;
begin
  Count:=0;
  For J:=0 to Image.Picture.BitMap.Height-1 do Begin
    For I:=0 to Image.Picture.BitMap.Width-1 do Begin
      Colour:=Image.Picture.Bitmap.Canvas.Pixels[I, J];
      R:=red(Colour);
      G:=Green(Colour);
      B:=Blue(Colour);
      If (R=G) and (R=B) Then Begin
        Image.Picture.Bitmap.Canvas.Pixels[I, J]:=GetColorFromGrey(Colour);
        Inc(Count);
        Image.Refresh;
      end;
    end;
  end;
end;
TagsNo tags attached.
Fixed in Revision
LazTarget-
WidgetsetWin32/Win64
Attached Files

Relationships

has duplicate 0036058 resolvedBart Broersma Fermeture inopinée d'une fenêtre en fin de procédure liée à un BitBtn de celle-ci. 

Activities

wp

2019-09-09 18:21

developer   ~0118006

Last edited: 2019-09-09 18:22

View 2 revisions

Please post a simple compilable project from which we can reproduce the issue, not just a code snippet.

Issue History

Date Modified Username Field Change
2019-09-09 17:41 Henri Maquoi New Issue
2019-09-09 18:21 wp Note Added: 0118006
2019-09-09 18:22 wp Note Edited: 0118006 View Revisions
2019-09-09 19:13 Bart Broersma Status new => feedback
2019-09-09 19:13 Bart Broersma LazTarget => -
2019-09-09 19:16 Bart Broersma Relationship added has duplicate 0036058