Recent

Author Topic: TWinControl.ControlByName(ControlName: String): TControl;  (Read 6057 times)

everton

  • Jr. Member
  • **
  • Posts: 89
TWinControl.ControlByName(ControlName: String): TControl;
« on: June 03, 2011, 08:05:49 pm »
This function is found in the IDE 0.9.28 but isn't found in the IDE 0.9.3.

Anybody knows why? Is a very simple implementation and in some cases very useful.

Is just make:

TWinControl.ControlByName(ControlName: String): TControl;
begin
  Result := nil;
  for i1 := 0 to ControlCount -1 do
    if Constrols[i1].Name = ControlName then
    begin
      Result := Constrols[i1];
      Break;
    end;
end;

 

TinyPortal © 2005-2018