was ist neu ¦  programmier tips ¦  indy artikel ¦  intraweb artikel ¦  informationen ¦  links ¦  interviews
 sonstiges ¦  tutorials ¦  Add&Win Gewinnspiel

Tips (1541)

Dateien (137)
Datenbanken (90)
Drucken (35)
Grafik (114)
IDE (21)
Indy (5)
Internet / LAN (130)
IntraWeb (0)
Mathematik (76)
Multimedia (45)
Oberfläche (107)
Objekte/
ActiveX (51)

OpenTools API (3)
Sonstiges (126)
Strings (83)
System (266)
VCL (242)

Tips sortiert nach
Komponente


Tip suchen

Tip hinzufügen

Add&Win Gewinnspiel

Werbung

29 Visitors Online


 
...Properties in der Delphi-IDE verbergen?
Autor: Benny Baumann
[ Tip ausdrucken ]  

Tip Bewertung (9):  
     


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: stringoverride;
    class function Description: stringoverride;
  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.

 

Bewerten Sie diesen Tipp:

dürftig
ausgezeichnet


Copyright © by SwissDelphiCenter.ch
All trademarks are the sole property of their respective owners