»áÔ±£º ÃÜÂ룺 ¡¡Ãâ·Ñ×¢²á | Íü¼ÇÃÜÂë | »áÔ±µÇ¼ ÍøÒ³¹¦ÄÜ£º ¼ÓÈëÊÕ²Ø ÉèΪÊ×Ò³ ÍøÕ¾ËÑË÷  
 °²È«¼¼Êõ¼¼ÊõÎĵµ
  ¡¤ °²È«ÅäÖÆ
  ¡¤ ¹¤¾ß½éÉÜ
  ¡¤ ºÚ¿Í½Ìѧ
  ¡¤ ·À»ðǽ
  ¡¤ Â©¶´·ÖÎö
  ¡¤ ÆƽâרÌâ
  ¡¤ ºÚ¿Í±à³Ì
  ¡¤ ÈëÇÖ¼ì²â
 °²È«¼¼ÊõÂÛ̳
  ¡¤ °²È«ÅäÖÆ
  ¡¤ ¹¤¾ß½éÉÜ
  ¡¤ ·À»ðǽ
  ¡¤ ºÚ¿ÍÈëÇÖ
  ¡¤ Â©¶´¼ì²â
  ¡¤ Æƽⷽ·¨
  ¡¤ É±¶¾×¨Çø
 °²È«¼¼Êõ¹¤¾ßÏÂÔØ
  ¡¤ É¨Ã蹤¾ß
  ¡¤ ¹¥»÷³ÌÐò
  ¡¤ ºóÃÅľÂí
  ¡¤ ¾Ü¾ø·þÎñ
  ¡¤ ¿ÚÁîÆƽâ
  ¡¤ ´úÀí³ÌÐò
  ¡¤ ·À»ðǽ
  ¡¤ ¼ÓÃܽâÃÜ
  ¡¤ ÈëÇÖ¼ì²â
  ¡¤ ¹¥·ÀÑÝʾ
¼¼ÊõÎĵµ > Delphi
¿ÉÒÔÉèÖöÔÆ뷽ʽµÄEdit×é¼þ
·¢±íÈÕÆÚ£º2005-03-15 23:57:37×÷ÕߣºÌ ³ö´¦£º  

{**
 * µ¥Ôª£ºFloatEdit
 * ×÷ÕߣºÍøÊÂÈç·ç
 * ×÷Ó㺿ÉÒÔÉèÖöÔÆ뷽ʽµÄEdit
 * ʹÓãº
 **}
 
 unit RightEdit;
 
 interface
 
 uses
   Windows, Messages, SysUtils, Classes, Controls, StdCtrls;
 
 type
   TRightEdit = class(TEdit)
   private
     FAlignment   : TAlignment;      //¶ÔÆ뷽ʽ
     procedure SetAlignment(Value: TAlignment);
   protected
     procedure CreateParams(var Params: TCreateParams); override;
   public
     { Public declarations }
   published
     property Alignment: TAlignment read FAlignment write SetAlignment;
   end;
 
 procedure Register;
 
 implementation
 
 procedure Register;
 begin
     RegisterComponents('MyCompent', [TRightEdit]);
 end;
 
 
 procedure TRightEdit.CreateParams(var Params: TCreateParams);
 begin
     inherited CreateParams(Params);
     Case FAlignment of
         taLeftJustify  : Params.Style := Params.Style + ES_LEFT;
         taRightJustify : Params.Style := Params.Style + ES_RIGHT;
         taCenter       : Params.Style := Params.Style + ES_CENTER;
     end;
 end;
 
 procedure TRightEdit.SetAlignment(Value: TAlignment);
 begin
     if FAlignment <> Value then
     begin
         FAlignment := Value;
         RecreateWnd;
     end;
 end;
 end.

¡¾·µ»Ø¶¥²¿¡¿ ¡¾´òÓ¡±¾Ò³¡¿ ¡¾¹Ø±Õ´°¿Ú¡¿

¹ØÓÚÎÒÃÇ / ¸øÎÒÁôÑÔ / °æȨ¾Ù±¨ / Òâ¼û½¨Òé / ÍøÕ¾±à³ÌQQȺ   
Copyright ©2003- 2024 Lihuasoft.net webmaster(at)lihuasoft.net ¼ÓÔØʱ¼ä 0.00159