Mega Code Archive

 
Categories / Delphi / Ide Indy
 

Hide properties in the ide

unit HideAboutProps; // Declare a Property-Category-Class // Eine Eigenschaftskategorie-Klasse deklarieren type TAboutPropCategory = class(TPropertyCategory) // Give it a name and a description // Namen und Beschreibung vergeben class function Name: string; override; class function Description: string; override; end; procedure Register; implementation // Register this new Property Category in the Delphi-IDE // Diese neue Eigenschaftskategory in Delphi registrieren procedure Register; begin RegisterPropertyInCathegory(TAboutPropCategory, 'About'); end; // Implementation of the two class functions from above // Den beiden Klasse-Funktionen noch eine Implementation geben class function TAboutPropCategory.Name: string; begin Result := 'About'; end; class function TAboutPropCategory.Description: string; begin // As you want it ... Result := 'Gives information about the author.'; // Wie man's möchte ... Result := 'Enthält Informationen über den Autor.'; end; // To use this new category, you only have to include this unit in a package and recompile it. // If you want, you now can hide all properties called 'About' from being displayed // in the object inspector. // Um diese neue Kategorie zu nutzen, muss man die Unit nur in ein Package einbinden // und dieses danach neu compilieren. // Wenn man möchte, kann man nun alle Eigenschaften, die 'About' heißen, verbergen.