Delphi 6.0 Property Editor's Solution

zhaozj2021-02-08  491

Delphi 6.0 Property Editor Solution Delphi You can declare the attribute editor to design the third-party control during programming, and the declaration of the attribute editor can be defined by the RegisterComponEnteditor process when the registration control is registered. procedure RegisterComponentEditor (ComponentClass: TComponentClass; ComponentEditor: TComponentEditorClass); of course, the user before registering to define their own property editor, the following is an example: TOutlookBarEditor = class (TComponentEditor) function GetVerb (Index: Integer): string; override; function GETVERBCOUNT: Integer; Override; Procedure; Override; end; the most critical part is a reference to RegisterComponenteditor. In Delphi5.0, you can copy the DSGnintf.PAS file in the $ (Delphi) / Source / Toolsapi directory to the design directory of the control or copy to the $ (Delphi) / lib directory. In Delphi6.0, Delphi decomposes files into DESIGNINTF.PAS and DESIGNEDITORS.PAS, so copy $ (Delphi) / Source / Toolsapi directory, two files to Designintf.Pas.Pas. In the design directory of the control, or copy to $ (Delphi) / lib directory. Of course, if your Delphi Package search path or the Delphi IDE search path can be searched for $ (Delphi) / source / Toolsapi directory to save this trouble. However, in Delphi 6.0, if you compile, you can find a problem with the proxies.dcu file. Because PROXIES is compiled, you can't find this related file at all in Delphi's directory. It has been compiled into the designide.dcp file, and the solution is simple, that is, in your package, you can quote Designide.dcp file, The specific method is: Project-> View source-> Add a reference to Designide in the Requires section.

转载请注明原文地址:https://www.9cbs.com/read-956.html

New Post(0)