Advertisement
rikokurniawan

PembersihEditBox_Otomatis

Jun 16th, 2015
919
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 1.09 KB | None | 0 0
  1. {
  2. Developper  : Riko Software
  3. Programmer  : Jean Riko Kurniawan Putra, S.Kom
  4. FB          : https://www.facebook.com/Jean.Riko.K.P
  5. Blog        : djeansoftware.blogspot.sg
  6. PIN BB      : 54B5758E
  7. }
  8. unit U1;
  9.  
  10. interface
  11.  
  12. uses
  13.   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  14.   Dialogs, StdCtrls;
  15.  
  16. type
  17.   TFBersih = class(TForm)
  18.     Edit1: TEdit;
  19.     Edit2: TEdit;
  20.     Edit3: TEdit;
  21.     Edit4: TEdit;
  22.     Edit5: TEdit;
  23.     Edit6: TEdit;
  24.     Edit7: TEdit;
  25.     Edit8: TEdit;
  26.     Edit9: TEdit;
  27.     Edit10: TEdit;
  28.     Button1: TButton;
  29.     Label1: TLabel;
  30.     Label2: TLabel;
  31.     procedure FormShow(Sender: TObject);
  32.   private
  33.     { Private declarations }
  34.   public
  35.     { Public declarations }
  36.   end;
  37.  
  38. var
  39.   FBersih: TFBersih;
  40.  
  41. implementation
  42.  
  43. {$R *.dfm}
  44.  
  45. procedure TFBersih.FormShow(Sender: TObject);
  46. var
  47.   i : Integer;
  48. begin
  49.   //Bersihkan Seluruh Editbox yang ada
  50.   for i := 0 to ComponentCount-1 do begin
  51.     if( Components[ i ] is TEdit )then begin
  52.       (Components[ i ] as TEdit).Clear;
  53.     end;
  54.   end;
  55.  
  56.   Edit1.SetFocus;
  57. end;
  58.  
  59. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement