Sortland Automasjon
VCL - HelpContext.pas - Org.gif - New.gif - Popup.gif - src - Arnulf

Do you remember the HelpContext ID when assigning new ID's ? Would you like to have a 'lookup option' when editing the 'HelpContext' property ?

Here only an InputQuery Box is used, replace it with a Grid, or .. a RichEdit control .. or .. and repost this article.

Here is all the code you need to add this kind of functonality to Delphi.

First create a class based on the kind of property we want to edit, here TIntegerProperty, then we want to override two functions on this class.

We need to specify that we want a 'Dialog' type of property editor, so we return [paDialog] in the GetAttributes function.

Then, we can do as we like in the Edit procedure, which in this case involves a InputQuery Box , only to demonstrate how to get, and set the value.

And at last we need to Register our new PropertyEditor.


Delphi Snippets - jun 1999 - Arnulf Sortland