Staci, ak overridnes metodu CreateParams v triede TEdit ( zadeklaruj ho pred formularom, v ktorom pouzivas takto upraveny komponent TEdit ):
Kód:
/* ........*/
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TEdit = class(StdCtrls.TEdit)
protected
procedure CreateParams(var Params: TCreateParams); override;
end;
/* az teraz pojde formular */
TForm1 = class(TForm)
Edit1: TEdit;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TEdit.CreateParams(var Params: TCreateParams);
begin
inherited;
Params.Style := Params.Style or ES_MULTILINE or ES_RIGHT;
end;
/* .... */