Adding an About dialog as a property to a custom component lazarus / 8-Other ---------------------------------------------------------------------- minesadorada · 2014-06-09 18:17 (Mods: I couldn't find a section for component writers; if this is in the wrong section, please move it) It's taken a lot of fiddling around, but I finally figure out how to make a generic 'About' property for a component that brings up a configurable 'About' dialog efficiently and fairly easily.  I think it makes a component look more 'classy' in the Object Inspector The approach is to use a generic subcomponent to construct the dialog 'on-the-fly .  This code is installed as a dependency of the component. Then, by using a custom propertyeditor the component can display the 'About' property in the Object Inspector as a non-editable value with an ellipsis button that brings up the modal About box (with optional license button) See the attached screenshot The trick is that the About box properties can all be set in the component constructor in a straightforward way, so that it's easy to add the [About] property capability to any component. Here's the Wiki page with more detailed information and a download link for example code: http://wiki.lazarus.freepascal.org/Adding_an_About_dialog_as_a_propert y_to_a_custom_component I hope folk find this useful. ---------------------------------------------------------------------- taazz · 2014-06-09 21:55 can I make a couple of suggestions if I may? 1) having an about property which shows a dialog in the designer will force the dialog to be included in the exe that component is used. 2) you made the process a bit over complicated. Remember that types can have custom editors globaly eg a base type can be of the form of TAboutVersion = type string; this will have a dual role on one hand it will show a version information inside the object inspector so no need to open the about box for a simple v1.2.112.4097876 number that can be used to communicate with the developers for bug reports etc and on the other hand the basic package that this type is declared can be used to define a design time editor for that type as well. after that it is a simple matter of creating 2 different packages for your components one run time that has all your components and one design time that has all the registering procedures. By simple defining a property of type TAboutVersion type you automatically have a custom editor that can be seen only in the IDE and a property that returns the components version at run time to be included on any other type of about or info dialog and of course no dialog backage. ---------------------------------------------------------------------- minesadorada · 2014-06-09 22:31 Quote from: taazz on June 09, 2014, 11:55:57 pmcan I make a couple of suggestions if I may? 1) having an about property which shows a dialog in the designer will force the dialog to be included in the exe that component is used. 2) you made the process a bit over complicated. Remember that types can have custom editors globaly eg a base type can be of the form of TAboutVersion = type string; this will have a dual role on one hand it will show a version information inside the object inspector so no need to open the about box for a simple v1.2.112.4097876 number that can be used to communicate with the developers for bug reports etc and on the other hand the basic package that this type is declared can be used to define a design time editor for that type as well. after that it is a simple matter of creating 2 different packages for your components one run time that has all your components and one design time that has all the registering procedures. By simple defining a property of type TAboutVersion type you automatically have a custom editor that can be seen only in the IDE and a property that returns the components version at run time to be included on any other type of about or info dialog and of course no dialog backage. Hi taazz - Suggestions and advice are always welcome by me 1) The dialog and controls are created and destroyed as they are shown.  Unless the component designer chooses to include a background image as a resource, the TAboutBox subcomponent should add very little to the EXE size. 2)  I'm interested in any alternative and more efficient approach, though I cannot understand your short description.  Have you a code snippet that would illustrate what it is? The vision was to make including an 'About' property into a component as easy and resource-friendly as possible. ---------------------------------------------------------------------- taazz · 2014-06-09 23:03 Quote from: minesadorada on June 10, 2014, 12:31:27 amQuote from: taazz on June 09, 2014, 11:55:57 pmcan I make a couple of suggestions if I may? 1) having an about property which shows a dialog in the designer will force the dialog to be included in the exe that component is used. 2) you made the process a bit over complicated. Remember that types can have custom editors globaly eg a base type can be of the form of TAboutVersion = type string; this will have a dual role on one hand it will show a version information inside the object inspector so no need to open the about box for a simple v1.2.112.4097876 number that can be used to communicate with the developers for bug reports etc and on the other hand the basic package that this type is declared can be used to define a design time editor for that type as well. after that it is a simple matter of creating 2 different packages for your components one run time that has all your components and one design time that has all the registering procedures. By simple defining a property of type TAboutVersion type you automatically have a custom editor that can be seen only in the IDE and a property that returns the components version at run time to be included on any other type of about or info dialog and of course no dialog backage. Hi taazz - Suggestions and advice are always welcome by me 1) The dialog and controls are created and destroyed as they are shown.  Unless the component designer chooses to include a background image as a resource, the TAboutBox subcomponent should add very little to the EXE size. well so do the {$R *.res} with icons for the components it is a waste of space non the less. It is a good practice for all component developers out there to break their packages in to 2 one design and one run time making sure no design time resources are polluting the user's applications. Quote from: minesadorada on June 10, 2014, 12:31:27 am2)  I'm interested in any alternative and more efficient approach, though I cannot understand your short description.  Have you a code snippet that would illustrate what it is? No sorry I did not implement something along those lines yet my 2 or 3 custom components do not benefit from something like that  I will non the less try to implement a proof of concept package just to make a point when I get some free time on my hands. ---------------------------------------------------------------------- minesadorada · 2014-06-09 23:23 Hi taazz, Thank you for your interest and comments. A 24x24px {$R *.res} component icon adds <1kB.  I think the days have gone when this is an intolerable overload.  Meanwhile the kerfuffle of deploying designtime and runtime versions of custom Visual components is maybe useful in some circumstances, but I think is redundant for most. In any case, it doesn't affect the TAboutBox subcomponent, which is always runtime-only and contains no icon or other graphical resources. The license text resources take < 6k and can save the developer having to deploy the actual licence text file with the component. Have you looked at the source? It is only the example component which I supplied in the zipfile that contains graphic resources, and they are all optional and up to the component developer. So I'm not seeing your point about EXE size and my [About] property subcomponent code precisely. Meanwhile I will await any more elegant concept package example code.  The TAboutBox subcomponent displays more than just version information; that was the vision - to help make user-contributed Lazarus visual components look more 'classy' and professional without using unnecessary resources or component developer's valuable time.  The code can easily be 'plugged in' to an existing component - which is an obvious requirement. ---------------------------------------------------------------------- taazz · 2014-06-10 01:02 Quote from: minesadorada on June 10, 2014, 01:23:54 amHi taazz, Thank you for your interest and comments. A 24x24px {$R *.res} component icon adds <1kB.  I think the days have gone when this is an intolerable overload.  Meanwhile the kerfuffle of deploying designtime and runtime versions of custom Visual components is maybe useful in some circumstances, but I think is redundant for most. I never said that the size of a single icon was a big deal, I said do not pollute my applications with resources I never use and  I did not said it for the about specifically which (as you already said) can be used at runtime as well as at design time, although I see no real value for run time use my self, others might find some value, so I can't complain too much. I'm only grabbing the opportunity to make a point (sniky eh?). In any case until I can show you some code I'll restraint my self from commenting any farther. ---------------------------------------------------------------------- CaptBill · 2014-06-10 02:35 If there was a way to force 'smart linking' on specific procedures/functions to effectively make it 'design time only' then this could be a nice feature. Even store the help/manpage on-board this way. Never have to hunt for the 'help files'. Taazz makes a good point though. The last thing we want is to add any bloat, even a little. Having a way as a component developer to force smartlinking to ensure zero run-time effects or size would be nice. ---------------------------------------------------------------------- Mike.Cornflake · 2014-06-10 05:57 The bloat we're talking here doesn't bother everyone.  Me for instance :-)  I agree with @minesadorada; in this case it's minimal, acceptable and offers useful functionality to the end user of the code. Very nice wiki page, many thanks for creating it. ---------------------------------------------------------------------- minesadorada · 2014-06-10 08:49 Writing this code taught me a few things and also presented a puzzle to solve. Firstly, you can build on a component like lego using subcomponents.  With properties like (Font) which is a kind of subcomponent, I can now add (Taboutbox) and (PoweredBy) etc.  The trick is to register a TClassPropertyEditor for the subcomponent. Secondly, in subcomponent writing, 'runtime' has an extra meaning than 'deployment'  A subcomponent can be marked as 'runtime only' because in the context of designing and running the main component it is in a runtime condition. The puzzle to solve was: how can a propertyeditor method access the properties and methods of a subcomponent?  My clumsy (but working) solution was to create/destroy a temporary global (to the component unit) copy of the component during the .Edit method. I still feel I am missing something obvious, though. Is there an elegant way to access the component's (and subcomponent's) properties and methods in a created propertyeditor's methods?  I couldn't see how their scopes could overlap - that's the 'I must be missing something obvious' feeling! Some clearer info on the RegisterPropertyEditor TypeInfo() parameter would also be useful.  For instance, if the PropertyEditor  is for a simple string property, should it be TypeInfo(string)? (some pseudocode to illustrate what I mean) Type TSomeComponent = Class(TComponent) private .... public ... protected ... published ... end; TMyPropertyEditor = Class(TPropertyEditor)  public     procedure Edit; override; end; implementation procedure register; begin   RegisterPropertyEditor(TypeInfo(),     TSomeComponent, 'PropertyName', TMyPropertyEditor); end; procedure TMyPropertyEditor.Edit; begin end; ...Also, I thought I'd try using THiddenPropertyEditor   "A property editor, to hide a published property. If you can't unpublish it,   hide it" to hide a Component's inherited 'Tag' property, (not for any good reason) but it didn;t work ---------------------------------------------------------------------- howardpc · 2014-06-10 11:03 Quote from: minesadorada on June 10, 2014, 10:49:26 amThe puzzle to solve was: how can a propertyeditor method access the properties and methods of a subcomponent?  ... Is there an elegant way to access the component's (and subcomponent's) properties and methods in a created propertyeditor's methods You looked at PropEdits.pp but didn't read quite far enough. Mattias has documented it well. Here's an extract: " Properties and methods useful in creating new TPropertyEditor classes:     Name property       Returns the name of the property returned by GetName     Value property       The current value,as a string,of the property as returned by GetValue.     GetXxxValue       Gets the value of the first property in the Properties property. Calls       the appropriate TProperty GetXxxValue method to retrieve the value.     SetXxxValue       Sets the value of all the properties in the Properties property. Calls       the approprate TProperty SetXxxxValue methods to set the value." So if none of the default property editors used by the Object Inspector can cope with the properties of your new component (which they nearly always can) you declare a new property editor and override the appropriate methods. Say you want the OI to display some caption in your component with its length in brackets afterwards, you could do this (untested code): Code: [Select]type   TStrangeStringPropertyEditor = class(TStringPropertyEditor)   public     function GetValue: ansistring; override;   end; ...   function TStrangePropertyEditor.GetValue: ansistring;   var    s: string;   begin     s:= inherited GetValue;     Result:=Format('%s (%d)', [s, Length(s)]); Then you register this editor with a call to RegisterPropertyEditor(), specifying TStrangePropertyEditor as the fourth parameter, immediately after the RegisterComponent() call in your new component's interface. Something like: Code: [Select]RegisterPropertyEditor(TypeInfo(TCaption), TMyStrangeComponent, 'StrangeCaption', TStrangeStringPropertyEditor); Specifying the type of your component and the specific property name will ensure that this string property editor is only used for display of that string, not for any other published component strings. ---------------------------------------------------------------------- taazz · 2014-06-10 12:41 OK find attached a reworked example of your code. I did not compile it or install it in my current installation so tweak as needed. What I did was to separate design from run time code, on both the aboutbox package and the customcomponent package, moved the property editor to the aboutbox component package instead of the customcomponent package, created a custom type for the editor to be used on (TAboutInfo) changed the editor to be based on TStringPropertyEditor because I see no value on basing it on tobjectpropertyeditor. in general it should give you a good idea on where I'm going with it. It is trivial to create a dialog inherited from your about box and add all the custom items you want and register it as the main class for the about box and the separation between design and run time package allows me to do the same in my applications as well for a more generic use. The most irritating thing on your code was that your packages where forcing my application to depend on IDEintf package which 1) is not needed in my application and 2) is under a very shaky waters for me at the time because part of the IDE is GPLed which means that my proprietary application will possibly break the gpl license if I do not share it as gpl as well that is un acceptable on all counts and it is the main reason for me to never use that component. I do not want to spend time worrying about gpl or its variants in my daily routine I got the impression that it is ok to write my own proprietary components on top of lcl and use them in my applications, but the IDE is an other matter altogether and I do not want to start any conflicts with the team. My generic reaction to GPL and its variants is "throw it out the window" for that library, with the only exception of lcl because I got a positive impression from this forums that no one cares to what I do in my proprietary application, as long as I give something back to the community I should be in the clear. So I try to give back as time permits. Now I need to clean all this references to those packages, back in my developement. PS Consider adding a couple of more license types more importandly the BSD variants and the MPL (mozila public license) ---------------------------------------------------------------------- BigChimp · 2014-06-10 13:55 Quote from: taazz on June 10, 2014, 02:41:49 pmMy generic reaction to GPL and its variants is "throw it out the window" for that library, with the only exception of lcl because I got a positive impression from this forums that no one cares to what I do in my proprietary application, as long as I give something back to the community I should be in the clear. So I try to give back as time permits. Well.. the LCL is licensed under modified LGPL, not GPL, a completely different kettle of fish. It allows you to link in the LCL with your proprietary code without any problems. Edit: see http://wiki.lazarus.freepascal.org/Licensing#Licensing_relat ing_to_FPC.2FLazarus_usage ---------------------------------------------------------------------- taazz · 2014-06-10 17:15 Quote from: BigChimp on June 10, 2014, 03:55:01 pmWell.. the LCL is licensed under modified LGPL, not GPL, a completely different kettle of fish. It allows you to link in the LCL with your proprietary code without any problems. Edit: see http://wiki.lazarus.freepascal.org/Licensing#Licensing_relat ing_to_FPC.2FLazarus_usage the modified lgpl is the only reason I gave lazarus a chance in the first place, none the less it makes me worry for the nature of gpl which is way to aggressive and best kept in check. ---------------------------------------------------------------------- minesadorada · 2014-06-11 08:58 Quote from: taazz on June 10, 2014, 02:41:49 pmOK find attached a reworked example of your code. I did not compile it or install it in my current installation so tweak as needed. ... Sorry for the late response - I was playing a golf tournament yesterday Thanks for this example taazz.  (You're right; it doesn't compile as is)  The idea looks complicated but elegant. On first glance there are some really interesting concepts in component-writing here, and I mean to study it in more depth and perhaps document what I have learned from it in the Wiki. I now see your point more clearly about designtime and runtime versions of a component - it can be done. ---------------------------------------------------------------------- minesadorada · 2014-06-11 11:29 At last - that satisfying 'Aha!' moment My puzzle was how to access the component's private member fAboutBox and its public method in the Class PropertyEditor.Edit method  It's an unusual situation. My first clumsy attempt was to declare a global var of the component type, create it as a temporary instance in the propertyeditor.edit method and call the subcomponent's public 'ShowDialog' method, then destroy the temporary instance. I know:  horrible code! But with a little help from the TFont code example in the Wiki, and helpful posts in this thread I finally came up with the correct and elegant solution: procedure TAboutPropertyEditor.Edit; // Communicate with the component fAboutBox properties Var    AAboutBox:TAboutBox; begin    AAboutBox:=TAboutBox.Create(nil);    AAboutBox:=TAboutBox(GetObjectValue(TAboutBox));    AABoutBox.ShowDialog; end;    Note: The TAboutBox subcomponent is now marked and compiled  'DesignTime only' so it shouldn't get included in any Application EXE (I think). ..I'll update the Wiki and sourcecode zip soon If I can get templates to work, I'll make a project template for the 'MyComponent with AboutBox' base code.  At the moment, it refuses to use the [Variables] section in my project.ini file, but that's another topic.... @howardpc Thanks for the RegisterPropertyEditor(TypeInfo(TCaption)... tip.  I would never have thought of using TCaption for a string result. ---------------------------------------------------------------------- taazz · 2014-06-11 11:48 Quote from: minesadorada on June 11, 2014, 01:29:06 pmprocedure TAboutPropertyEditor.Edit; // Communicate with the component fAboutBox properties Var    AAboutBox:TAboutBox; begin    AAboutBox:=TAboutBox.Create(nil); //<------- memory leak   AAboutBox:=TAboutBox(GetObjectValue(TAboutBox));   AABoutBox.ShowDialog; end;    Note: the AboutBox object does not need to be FreeandNil'd in this method - it would cause an error. ..I'll update the Wiki and sourcecode zip soon Neither it needs to be created. ---------------------------------------------------------------------- minesadorada · 2014-06-11 12:23 Quote from: taazz on June 11, 2014, 01:48:29 pmQuote from: minesadorada on June 11, 2014, 01:29:06 pmprocedure TAboutPropertyEditor.Edit; // Communicate with the component fAboutBox properties Var    AAboutBox:TAboutBox; begin    AAboutBox:=TAboutBox.Create(nil); //<------- memory leak   AAboutBox:=TAboutBox(GetObjectValue(TAboutBox));   AABoutBox.ShowDialog; end;    Note: the AboutBox object does not need to be FreeandNil'd in this method - it would cause an error. ..I'll update the Wiki and sourcecode zip soon Neither it needs to be created. Dead right - thanks! ---------------------------------------------------------------------- minesadorada · 2014-06-11 13:52 OK we have an updated and working code example now at: http://www.charcodelvalle.com/aboutdialog/aboutdialog_component_code.z ip Wiki page: http://wiki.lazarus.freepascal.org/Adding_an_About_dialog_a s_a_property_to_a_custom_component I'll update this thread if I can get a working Project template uploaded. Thanks gurus on this thread for the help - it's been a good learning experience for me ---------------------------------------------------------------------- minesadorada · 2014-06-13 16:08 Update: I couldn't get project templates working for component packages (not surprising) so I have gone on a different tack. Now the process for writing a new component with a built-in 'About' property (which brings up the dialog) is: (Once-only) Install the AboutComponent package in your IDE..This will go onto the 'LazControls' tab.  It is tagged as DesignTime only, so won't get compiled into an EXE. Package/New Component - choose 'TAboutComponent' as the ancestor typeTAboutComponent is just TComponent class with the extra property In your Constructor Create(), set the particular Dialog properties for your component (all optional)..That's it! The properties are:   AboutBoxComponentName (string)   AboutBoxWidth (integer)   AboutBoxHeight (integer)   AboutBoxDescription (string - can contain LineEndings)   AboutBoxBackgroundColor (TColor, like clWhite)   AboutBoxFontName (string)   AboutBoxFontSize (integer)   AboutBoxVersion (string)   AboutBoxAuthorname (string)   AboutBoxOrganisation (string)   AboutBoxAuthorEmail (string)   AboutBoxLicenseType (string e.g. 'GPL', ModifiedGPL' etc) zipfile with updated TAboutDialog component and readme: http://www.cha rcodelvalle.com/aboutdialog/aboutdialog_component_code.zip I would have liked the TAboutDialog class to appear as a component ancestor in the list without having an icon on the IDE, but couldn't find a way.. I'll update the Wiki page after the football ---------------------------------------------------------------------- taazz · 2014-06-13 18:28 I've already shown you how to do it with out all this extra code. Take a look on how I used registerpropertyditor. ---------------------------------------------------------------------- minesadorada · 2014-06-14 07:21 Quote from: taazz on June 13, 2014, 08:28:16 pmI've already shown you how to do it with out all this extra code. Take a look on how I used registerpropertyditor. I did try your register code, but it didn't achieve my goal of including it on the ancestor list without displaying it on the IDE palette - but thanks anyway. The deployment method using the DesignTime lpk files is the absolute simplest, with no effort for the component writer. However.. There is another method of deploying;  and this also works to 'convert' an existing component so that it displays the 'About' property and dialog in the OI. Copy the files: aboutboxunit.pas, aboutcomponentunit.pas and license.lrs to your component directoryAdd the pas files to your component packageIn your component Interface Uses clause, add AboutComponentunitIn your component class declaration, simply replace =class(TComponent) with class(TAboutComponent) - no need to do it anywhere elseNow the 'About' property is in place, simply set the About dialog properties in your Constructor You deploy your component package with the 3 extra files - simples! No IDE registration needed, and no extra fat in any EXE. The final refactoring I can do is bundle the TAboutBox class code with the TAboutComponent one (edit:done), and include the license text as resourcestrings (along with all other strings) Then it becomes: Copy over and add the single aboutomponentunit.pas file in your packageIn your component Interface Uses clause, add AboutComponentunitIn your component class declaration, simply replace =class(TComponent) with class(TAboutComponent) - no need to do it anywhere elseNow the 'About' property is in place, simply set the About dialog properties in your ConstructorDeploy aboutcomponentunit.pas with your component (in its package) Again; no pre-registration or pre-installation in the IDE, and no extra fat.  Even more simples Edit: There could be naming conflicts with multiple TAboutComponent sources.  To solve this: Rename aboutcomponentunit to something more appropriate (aboutunit.pas for instanceRename the Unit to matchSearch/replace all TAboutComponent references with your new name (TAbout for instance)..Then install as above. see: http://www.charcodelvalle/scrollingtext/scrollingtext_component.zip and http://www.charcodelvalle/poweredby/powered_component.zip as examples. ---------------------------------------------------------------------- taazz · 2014-06-14 11:24 Quote from: minesadorada on June 14, 2014, 09:21:40 amQuote from: taazz on June 13, 2014, 08:28:16 pmI've already shown you how to do it with out all this extra code. Take a look on how I used registerpropertyditor. I did try your register code, but it didn't achieve my goal of including it on the ancestor list without displaying it on the IDE palette - but thanks anyway. The registerpropertyeditor call has nothing to do with registering the component in the IDE. Those two where created for different reasons and I repeat I added the taboutbox on the ide so I can drop the component on my main form and used it as an about dialog for my application instead of component you can avoid adding it if you do not want to. Quote from: minesadorada on June 14, 2014, 09:21:40 amThe deployment method using the DesignTime lpk files is the absolute simplest, with no effort for the component writer. However.. There is another method of deploying;  and this also works to 'convert' an existing component so that it displays the 'About' property and dialog in the OI. Copy the files: aboutboxunit.pas, aboutcomponentunit.pas and license.lrs to your component directoryAdd the pas files to your component packageIn your component Interface Uses clause, add AboutComponentunitIn your component class declaration, simply replace =class(TComponent) with class(TAboutComponent) - no need to do it anywhere elseNow the 'About' property is in place, simply set the About dialog properties in your Constructor You are assuming that I have the luxury to use TAboutComponent as ancestor what is going to happen for my components that are extensions of existing controls eg. zdDatetimePicker, TatTabs to name a few controls you can find in this forums that can not change the ancestor to Tcomponent your idea to automate it is excelent your implementation is off the mark for a lot of controls, it is more complicated than it needs to be and one of my primary goals is not met ee do not include the dialog in my application this is a design time only ability there is no point in having the dialog for each component in my application I'm not going to surface the call for every component I use. Quote from: minesadorada on June 14, 2014, 09:21:40 amsnip .. good information but irrelevant to the topic at hand. PS. I'm only commenting on what I see as a problem for me. I do not use nor I have any intention to use you component. So feel free to ignore me I do not mind. ---------------------------------------------------------------------- minesadorada · 2014-06-15 10:05 Quote from: taazz on June 14, 2014, 01:24:25 pmYou are assuming that I have the luxury to use TAboutComponent as ancestor what is going to happen for my components that are extensions of existing controls eg. zdDatetimePicker, TatTabs to name a few controls you can find in this forums that can not change the ancestor to Tcomponent your idea to automate it is excelent your implementation is off the mark for a lot of controls, it is more complicated than it needs to be and one of my primary goals is not met ee do not include the dialog in my application this is a design time only ability there is no point in having the dialog for each component in my application I'm not going to surface the call for every component I use. Actually the TAboutComponent code does not have to inherit directly from TComponent.    It acts as a layer between your component ancestor and your component.    For example, a TScrollText control I wrote recently inherits from TGraphicControl.  To add the 'About' property to the component, all I had to do was customise the TAboutComponent to inherit from TGraphicControl class (a 1-line edit) and then TScrollText could inherit from the changed TAboutComponent class.  I provided a link to the zipped TScrollText code to show how it could be done. Of course, the proper place for the About property is at the base TComponent heirarchy (along with Tag), but I'm not about to ask the Laz team to implement it    However it can be 'sandwiched' pretty much anywhere from TComponent downwards - presumably even in your zdDateTimePicker component if it installs on the palette. Quote from: minesadorada on June 14, 2014, 09:21:40 amsnip .. good information but irrelevant to the topic at hand. I'm happy to be quoted on a forum, but please don't make words up. Quote from: taazz on June 14, 2014, 01:24:25 pmPS. I'm only commenting on what I see as a problem for me. I do not use nor I have any intention to use you component. So feel free to ignore me I do not mind. Hopefully I have answered your problem, and I never ignore helpful criticism by the way - it helps me to improve. The About property is not intended to be functional; it's marked as designtime-only after all. That doesn't mean that it lacks a purpose. It is information from the component writer to the component user. It can be simple attribution, license info and a version number, or more; in my example TScrollText 'about' dialog is information about the two properties that define the component, and saves the user the trouble of looking up readme's or guessing which property or method from the completion list is the key one to use in order to deploy the component quickly and easily. An about dialog  is something most applications feature, after all - even Lazarus itself has an 'About' dialog.  Why not your HomeBrew component? ---------------------------------------------------------------------- taazz · 2014-06-15 11:46 Quote from: minesadorada on June 15, 2014, 12:05:11 pmQuote from: taazz on June 14, 2014, 01:24:25 pmYou are assuming that I have the luxury to use TAboutComponent as ancestor what is going to happen for my components that are extensions of existing controls eg. zdDatetimePicker, TatTabs to name a few controls you can find in this forums that can not change the ancestor to Tcomponent your idea to automate it is excelent your implementation is off the mark for a lot of controls, it is more complicated than it needs to be and one of my primary goals is not met ee do not include the dialog in my application this is a design time only ability there is no point in having the dialog for each component in my application I'm not going to surface the call for every component I use. Actually the TAboutComponent code does not have to inherit directly from TComponent.    It acts as a layer between your component ancestor and your component.    For example, a TScrollText control I wrote recently inherits from TGraphicControl.  To add the 'About' property to the component, all I had to do was customise the TAboutComponent to inherit from TGraphicControl class (a 1-line edit) and then TScrollText could inherit from the changed TAboutComponent class.  I provided a link to the zipped TScrollText code to show how it could be done. Of course, the proper place for the About property is at the base TComponent heirarchy (along with Tag), but I'm not about to ask the Laz team to implement it    However it can be 'sandwiched' pretty much anywhere from TComponent downwards - presumably even in your zdDateTimePicker component if it installs on the palette. Quote from: minesadorada on June 14, 2014, 09:21:40 amsnip .. good information but irrelevant to the topic at hand. I'm happy to be quoted on a forum, but please don't make words up. Quote from: taazz on June 14, 2014, 01:24:25 pmPS. I'm only commenting on what I see as a problem for me. I do not use nor I have any intention to use you component. So feel free to ignore me I do not mind. Hopefully I have answered your problem, and I never ignore helpful criticism by the way - it helps me to improve. The About property is not intended to be functional; it's marked as designtime-only after all. That doesn't mean that it lacks a purpose. It is information from the component writer to the component user. It can be simple attribution, license info and a version number, or more; in my example TScrollText 'about' dialog is information about the two properties that define the component, and saves the user the trouble of looking up readme's or guessing which property or method from the completion list is the key one to use in order to deploy the component quickly and easily. An about dialog  is something most applications feature, after all - even Lazarus itself has an 'About' dialog.  Why not your HomeBrew component? I see well good luck with your endeavors, just one off topic question, which words I made up? ---------------------------------------------------------------------- minesadorada · 2014-06-15 12:22 Quote from: taazz on June 15, 2014, 01:46:39 pmI see well good luck with your endeavors, just one off topic question, which words I made up? [offtopic]@tzaaz: Not that it matters, but nowhere did I write "good information but irrelevant to the topic at hand" - that would have been rude.[/offtopic] The latest integrated aboutcomponentunit source is now at: http://www.charcodelvalle.com/taboutcomponent/taboutcomponent.zip See example: http://www.charcodelvalle.com/scrollingtext/scrollingtext _component.zip for an example of integrating it into an existing component. Wiki link: http://wiki.lazarus.freepascal.org/Adding_an_About_dialog_a s_a_property_to_a_custom_component ---------------------------------------------------------------------- taazz · 2014-06-15 12:30 Quote from: minesadorada on June 15, 2014, 02:22:22 pmQuote from: taazz on June 15, 2014, 01:46:39 pmI see well good luck with your endeavors, just one off topic question, which words I made up? [offtopic]@tzaaz: Not that it matters, but nowhere did I write "good information but irrelevant to the topic at hand" - that would have been rude.[/offtopic] Well if any one misunderstood that sentence as yours I apologize it was my glumpsy attempt to not include a bounch of unrelated information in the topic. Here I'm off this topic. thank you for your time