home *** CD-ROM | disk | FTP | other *** search
/ PC Format Collection 48 / SENT14D.ISO / tech / delphi / disk14 / doc.pak / MASKPROP.INT < prev    next >
Encoding:
Text File  |  1995-08-24  |  1.7 KB  |  63 lines

  1.  
  2. {*******************************************************}
  3. {                                                       }
  4. {       Delphi Visual Component Library                 }
  5. {                                                       }
  6. {       Copyright (c) 1995 Borland International        }
  7. {                                                       }
  8. {*******************************************************}
  9.  
  10. unit MaskProp;
  11.  
  12. interface
  13.  
  14. uses WinTypes, WinProcs, Classes, Graphics, Forms, Controls, StdCtrls,
  15.   ExtCtrls, Buttons, DsgnIntf, Mask, SysUtils, Dialogs;
  16.  
  17. type
  18. { TMaskProperty
  19.   Property editor the Masked Edit Mask property   }
  20.  
  21.   TMaskProperty = class(TStringProperty)
  22.   public
  23.     function  GetAttributes: TPropertyAttributes; override;
  24.     procedure Edit; override;
  25.   end;
  26.  
  27.  
  28. type
  29.   TMaskForm = class(TForm)
  30.     InputMask: TEdit;
  31.     Label1: TLabel;
  32.     ListBox1: TListBox;
  33.     Label2: TLabel;
  34.     Label3: TLabel;
  35.     TestEdit: TMaskEdit;
  36.     Label4: TLabel;
  37.     Blanks: TEdit;
  38.     Bevel1: TBevel;
  39.     OKButton: TBitBtn;
  40.     CancelButton: TBitBtn;
  41.     HelpButton: TBitBtn;
  42.     SaveMaskCheck: TCheckBox;
  43.     Masks: TButton;
  44.     OpenDialog1: TOpenDialog;
  45.     procedure BlanksChange(Sender: TObject);
  46.     procedure InputMaskChange(Sender: TObject);
  47.     procedure ListDrawItem(Control: TWinControl;
  48.           Index: Integer; Rect: TRect; State: TOwnerDrawState);
  49.     procedure ListBoxSelect(Sender: TObject);
  50.     procedure FormCreate(Sender: TObject);
  51.     procedure MasksClick(Sender: TObject);
  52.   protected
  53.     function GetListMaskValue(Index: Integer): string;
  54.     function GetMaskValue(const Value: string): string;
  55.     procedure Loaded; override;
  56.   public
  57.   end;
  58.  
  59. var
  60.   MaskForm: TMaskForm;
  61.  
  62. implementation
  63.