home *** CD-ROM | disk | FTP | other *** search
-
- {*******************************************************}
- { }
- { Delphi Visual Component Library }
- { }
- { Copyright (c) 1995 Borland International }
- { }
- {*******************************************************}
-
- unit MaskProp;
-
- interface
-
- uses WinTypes, WinProcs, Classes, Graphics, Forms, Controls, StdCtrls,
- ExtCtrls, Buttons, DsgnIntf, Mask, SysUtils, Dialogs;
-
- type
- { TMaskProperty
- Property editor the Masked Edit Mask property }
-
- TMaskProperty = class(TStringProperty)
- public
- function GetAttributes: TPropertyAttributes; override;
- procedure Edit; override;
- end;
-
-
- type
- TMaskForm = class(TForm)
- InputMask: TEdit;
- Label1: TLabel;
- ListBox1: TListBox;
- Label2: TLabel;
- Label3: TLabel;
- TestEdit: TMaskEdit;
- Label4: TLabel;
- Blanks: TEdit;
- Bevel1: TBevel;
- OKButton: TBitBtn;
- CancelButton: TBitBtn;
- HelpButton: TBitBtn;
- SaveMaskCheck: TCheckBox;
- Masks: TButton;
- OpenDialog1: TOpenDialog;
- procedure BlanksChange(Sender: TObject);
- procedure InputMaskChange(Sender: TObject);
- procedure ListDrawItem(Control: TWinControl;
- Index: Integer; Rect: TRect; State: TOwnerDrawState);
- procedure ListBoxSelect(Sender: TObject);
- procedure FormCreate(Sender: TObject);
- procedure MasksClick(Sender: TObject);
- protected
- function GetListMaskValue(Index: Integer): string;
- function GetMaskValue(const Value: string): string;
- procedure Loaded; override;
- public
- end;
-
- var
- MaskForm: TMaskForm;
-
- implementation
-