//----------------------------------------------------------------------- // HelpContext PropertyEditor Demo // // Copyright (c) 1999 - Sortland Automasjon - All Rights Reserved // // Delphi Snippets : http://www.sortland.net/Delphi/Snippets.htm //-----------------------------------------------------------------------unit HelpContext; interface uses Classes, SysUtils, DsgnIntf; type THelpContextProperty = class(TIntegerProperty) public function GetAttributes: TPropertyAttributes; override; procedure Edit; override; end; procedure Register; implementation uses Dialogs, Forms; function THelpContextProperty.GetAttributes: TPropertyAttributes; begin Result := [paDialog]; // We want the '...' dialog button end; procedure THelpContextProperty.Edit; var NewString: string; begin // Replace this code with your own NewString := GetValue; if InputQuery('Replace this Box with a Grid, or ...', 'Enter HelpContext ID', NewString) then SetValue(NewString); end; procedure Register; begin RegisterPropertyEditor( TypeInfo( THelpContext ), // A property editor for 'HelpContext' nil, '', THelpContextProperty // Use our new 'THelpContextProperty' ); end; end.