Lazarus

Programming => Packages and Libraries => Ported from Delphi/Kylix => Topic started by: asdf on February 25, 2011, 10:48:55 am

Title: TwinControl vs. TreeListView
Post by: asdf on February 25, 2011, 10:48:55 am
In a small test project, TreeListView worked very nice and there was no problem if open/exit the project.

But when I just placed this blank component in my accounting project and saved/exit the project.

After that, when I opened the project, I got an error message and another window in a row.

What does the error message mean ?
Title: Re: TwinControl vs. TreeListView
Post by: asdf on February 25, 2011, 11:27:41 am
In my project, there is a procedure ...
Quote
procedure TMainScreenForm.LightGrid;

  procedure DoLightGrid(const c: TWinControl);
  var
    ii: Integer;
  begin
    if c is TStringGrid then begin
      with TStringGrid(c) do begin
        AlternateColor:= $00FCFAF5;
        color:= $00F7F1E6;
        FixedColor:= $00F2EAD9;
        Flat:= true;
        BorderStyle:= bsnone;
        Options:= Options - [goFixedVertLine] - [goVertLine];
      end;
    end;
    for ii := 0 to c.ControlCount - 1 do
      if c.Controls[ii] is TWinControl then
        DoLightGrid(TWinControl(c.Controls[ii]));
  end;

begin
  DoLightGrid(Self);
end;

This procedure fought with TreeListView for after I removed this procedure, everything went well. But, I lost this important procedure. This procedure is to rearrange the properties of dozens of StringGrids to be the same format in the form for convenience.

Kindly help editing this procedure with great thanks.                               
TinyPortal © 2005-2018