Recent

Author Topic: TwinControl vs. TreeListView  (Read 5939 times)

asdf

  • Sr. Member
  • ****
  • Posts: 310
TwinControl vs. TreeListView
« 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 ?
Lazarus 1.2.4 / Win 32 / THAILAND

asdf

  • Sr. Member
  • ****
  • Posts: 310
Re: TwinControl vs. TreeListView
« Reply #1 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.                               
« Last Edit: February 25, 2011, 11:30:09 am by asdf »
Lazarus 1.2.4 / Win 32 / THAILAND

 

TinyPortal © 2005-2018