home *** CD-ROM | disk | FTP | other *** search
- {Ini-File Component
-
- Designer: Craig Ward
- Date: 1/9/95
-
- Function: Sets location to app's Ini-file
- *******************************************************************************}
- unit Ini;
-
- interface
-
- uses
- SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
- Forms, Dialogs, IniFiles;
-
- type
- TIniFilePath = class(TComponent)
- private
- { Private declarations }
- FPath: string;
- procedure SetIniFilePath(Value: string);
- protected
- { Protected declarations }
- public
- { Public declarations }
- published
- { Published declarations }
- property Path: string read FPath write SetIniFilePath;
- end;
-
- procedure Register;
-
- {****************************************************************************}
- implementation
-
- {procedure to register this as a custom component}
- procedure Register;
- begin
- RegisterComponents('Samples', [TIniFilePath]);
- end;
-
- {set the path}
- procedure TIniFilePath.SetIniFilePath(Value: string);
- begin
- if value <> FPath then
- begin
- FPath := Value;
- end;
- end;
-
- end.
-