Hello Mr.,

Wednesday, September 24, 2003, 8:49:16 AM, you wrote:

MD> Frend tanya nih, gimana cara agar tEdit or tMaskEdit bisa rata kanan.
MD> Itu aja deh thank's ya.

coba ini (dari www.swissdelphicenter.com)

{
Thereto�you�must�override�the�CreateParams�of�the�class�TEdit.�The�following�unit
can�you�install�as�component.
}

unit�AlignEdit;

interface

uses
��Windows,�Messages,�SysUtils,�Classes,�Graphics,�Controls,�Forms,�Dialogs,
��StdCtrls;

type

��TAlign�=�(eaLeft,�eaCenter,�eaRight);

��TAlignEdit�=�class(TEdit)
��private
����{�Private-Deklarationen�}
����FAlign:�TAlign;
����procedure�SetAlign(Const�Value�:�TAlign);
��protected
����{�Protected-Deklarationen�}
����procedure�CreateParams(var�Params:�TCreateParams);�override;
��public
����{�Public-Deklarationen�}
����Constructor�Create(AOwner�:�TComponent);�override;
��published
����{�Published-Deklarationen�}
����property�Alignment:�TAlign�read�FAlign�write�SetAlign�default�eaLeft;
��end;

procedure�Register;

implementation

constructor�TAlignEdit.Create(Aowner�:�TComponent);
begin
���inherited�Create(AOwner);
���FAlign�:=�eaLeft;
end;

procedure�TAlignEdit.SetAlign(const�Value�:�TAlign);
begin
���if�FAlign�<>�Value�then
���begin
������FAlign�:=�Value;
������RecreateWnd;
���end;
end;

procedure�TAlignEdit.CreateParams(var�Params:�TCreateParams);
begin
��inherited;
��case�FAlign�of
����eaLeft����:�Params.Style�:=�Params.Style�or�ES_LEFT;
����eaCenter��:�Params.Style�:=�Params.Style�or�ES_CENTER;
����eaRight���:�Params.Style�:=�Params.Style�or�ES_RIGHT;
��end;
end;

procedure�Register;
begin
��RegisterComponents('SwissDelphiCenter',�[TAlignEdit]);
end;

end.

-- 
Best regards,
 Irwan
 [EMAIL PROTECTED]



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Upgrade to 128-Bit SSL Security!
http://us.click.yahoo.com/p7cEmB/s7qGAA/yigFAA/i7folB/TM
---------------------------------------------------------------------~->

Berlangganan: [EMAIL PROTECTED]
Stop Berlangganan: [EMAIL PROTECTED]
Keluhan Milis(Unbouncing,spam,dll): [EMAIL PROTECTED] 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 


Kirim email ke