hi,

I have a simple question about repainting controls in a form but this example 
is maybe simpler to ask my question :

I have a form with 1 TButton, 1 TEdit and 1 TMemo.

    the text 'Edit1' is displayed in TEdit.text
    the text 'Memo1' is displayed in the first line of TMemo

In my code Button1.OnClick i have just 2 lines :

procedure TForm1.Button1Click(Sender: TObject);
begin
  FormStyle := fsNormal;
  FormStyle := fsStayOnTop;
end;

In my TForm.OnDeactivate i have just this line :

procedure TForm2.FormDeactivate(Sender: TObject);
begin
  Memo1.Lines.Add('deactivate');
end;


Question : when i launch my form I see the 2 text "Edit1" and "Memo1" correctly 
displayed.
Then when I click on the button, the "Edit1" text stay right displayed in TEdit
but the text of TMemo is erased, why ?

TEdit and TMemo have exactly the same priciapl heritance 
hierarchy...(TWincontrol... TPersistent...).

Anyone can help me ?

Cédric


_______________________________________________
Delphi mailing list -> Delphi@elists.org
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi

Reply via email to