Recent

Author Topic: [SOLVED] Where are property descriptions for the object inspector are stored?  (Read 3296 times)

feds

  • New Member
  • *
  • Posts: 33
Hi all
I'm just trying to make my first own component.

But i can not figure out how to provide the descriptions of the component properties in the object inspector (this is the helping text that is shown in the infobox at the bottom of the object inspector).

Can anyone please give a hint or a pointer to an example to llokup this?

Thanks in advance

regards
Feds :)
« Last Edit: June 27, 2017, 09:56:15 pm by feds »

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: Where are property descriptions for the object inspector are stored?
« Reply #1 on: June 26, 2017, 08:29:48 pm »
They are autogenerated for anything in the "published" section. If you then derive from TComponent (or something that derives from tcomponent) it should be ok.


feds

  • New Member
  • *
  • Posts: 33
Re: Where are property descriptions for the object inspector are stored?
« Reply #2 on: June 26, 2017, 08:41:36 pm »
But how can a description like "True if this is the modal Cancel button." (from canel-property of TButton) can be auto-generated?

Or, the other way around, how can i (that me, not automatic  :) ) give a usefull description to a property that is in my componen?

I.e assume in mycomponent there is a property "preshift" and the text in the info box should be 'Number of clocks requred in front of the data package'.

I can't imagine that the IDE can this figure out automaticly.

Regards
Feds 
 


marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: Where are property descriptions for the object inspector are stored?
« Reply #3 on: June 26, 2017, 08:44:15 pm »
Ah you really mean description. Only thing I can imagine is the help.

feds

  • New Member
  • *
  • Posts: 33
Re: Where are property descriptions for the object inspector are stored?
« Reply #4 on: June 26, 2017, 09:05:56 pm »
When you move the mouse over a property in the object inspector then a context-sensitive help text is shown. This one has a section called "Description". And thate is the text that is also shown in the infobox at the bottom of the object inspector.

And this is what i want to set. But even looking at the sources of the standard LCL components i can't find where this is stored  :(

Regards
Feds

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: Where are property descriptions for the object inspector are stored?
« Reply #5 on: June 26, 2017, 09:38:07 pm »
When you move the mouse over a property in the object inspector then a context-sensitive help text is shown. This one has a section called "Description". And thate is the text that is also shown in the infobox at the bottom of the object inspector.

And this is what i want to set. But even looking at the sources of the standard LCL components i can't find where this is stored  :(

See if you find the texts in (lazarus)/docs/xml. If so, then the descriptions come from fpdoc generated helpfile information.

minesadorada

  • Sr. Member
  • ****
  • Posts: 452
  • Retired
Re: Where are property descriptions for the object inspector are stored?
« Reply #6 on: June 26, 2017, 10:42:48 pm »
When you move the mouse over a property in the object inspector then a context-sensitive help text is shown. This one has a section called "Description". And thate is the text that is also shown in the infobox at the bottom of the object inspector.

And this is what i want to set. But even looking at the sources of the standard LCL components i can't find where this is stored  :(

Regards
Feds
Put the explanatory text as a comment immediately above each property declaration.
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

feds

  • New Member
  • *
  • Posts: 33
Thanks a lot to you both.

After some experiments it becomes quite clear.

@marcov: You're right (of course) most of the content in the info box was generated using fpdoc / fpdoc-editor.
I have to admit that i didn't use this great feature until now (usually doxygen with C/C++).

But the Lazarus solution (click into the source and edit the documentation in the fpdoc-editor window is awesome.
The code stays readable (read compact) and the documentation is still complete. Great solution.

@minesadorada: Yes. Thats what i'm looking for. Together with fpdoc it solves all of my src code documentation needs.
Minor question: When adding documentation as comment is there any way to format it (it shows as italics by default)?

Kind regards
Feds

 

TinyPortal © 2005-2018