Meineserachtens kann man ES_CENTER, ES_LEFT, ES_RIGHT nur in CreateParams setzen
Delphi-Quellcode:
T??? = class (TEdit)
private
fAlignment : TAlignment;
published
property Alignment : TAlignment read fAlignment write SetAlignment;
end;
procedure TPWEdit.SetAlignment(const Value: TAlignment);
begin
if Value <> fAlignment then
begin
fAlignment := Value;
RecreateWnd; // erzeuge Fenster neu -> CreateParams
end;
end;
procedure T???.CreateParams(var Params: TCreateParams);
const
cAlignStyles: array [TAlignment] of Cardinal = (ES_LEFT, ES_RIGHT, ES_CENTER);
begin
inherited;
with Params do
Style := Style or cAlignStyles[fAlignment];
end;
das sollte gehen