Ads 468x60px

Smaller time frame always follow the bigger time frame. It's better wait be patience to enter in position than risk with BIG SL. Having strong trading discipline and taking losses when necessary is a sign of serious trading approach

Saturday, August 11, 2012

HOW TO CLEAR MULTIPLE EDIT CONTROLS WITHOUT HAVING TO REFER TO THEM ONE BY ONE


So your new form has 40 edit controls, and now you're looking for a quick and easy way to clear all of them without having to refer to them one by one. How about using a function like this: 
procedure TForm1.Button1Click(Sender: TObject);
var
  i : integer;
begin
  for i := 0 to ComponentCount-1 do
    begin
      if( Components[ i ] is TEdit )then
      begin
        (Components[ i ] as TEdit).Text := '';
      end;
  end;
end;



comments