Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Getting Started with Lazarus IDE

You're reading from  Getting Started with Lazarus IDE

Product type Book
Published in Feb 2013
Publisher Packt
ISBN-13 9781782163404
Pages 116 pages
Edition 1st Edition
Languages
Author (1):
Roderick Person Roderick Person
Profile icon Roderick Person

Property editors


Property editors are custom dialogs for editing special properties of a component. The standard property types, such as strings, images, or enumerated types, have default property editors, but special property types may require you to write custom property editors.

Custom property editors must extend from the class TPropertyEditor or one of its descendant classes. Property editors must be registered in the Register procedure using the function RegisterPropertyEditor from the unit PropEdits. An example of property editor class declaration is given as follows:

TPropertyEditor = class
  public
    function  AutoFill: Boolean; Virtual;
    procedure Edit; Virtual; // double-clicking the property value to activate
    procedure ShowValue; Virtual; //control-clicking the property value to activate
    function  GetAttributes: TPropertyAttributes; Virtual;
    function  GetEditLimit: Integer; Virtual;
    function  GetName: ShortString; Virtual;    
    function  GetHint(HintType...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}