Sign in Join
Wiki copytemporary

RTTI controls: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: RTTI controls

OldNewLine
1+This page describes the package **RunTimeTypeInfoControls** in \<lazarusdir\>/components/rtticontrols/.
2+
3+RTTI controls extend many LCL controls by the ability to directly connect to published properties of classes. They greatly reduce writing boring code, by automatically loading/saving data between LCL controls and published properties. In fact, you can create fully functional forms without writing any code at all.
4+
5+In combination with [[Streaming components]] you can reduce the amount of code needed for connecting the program Data with the GUI and the Disk/Network to a minimum.
6+
7+## Testing Components
8+
9+The RTTI controls are very useful when writing/testing a component.
10+
11+- Drop the component onto a form
12+- Drop an RTTI control onto the form
13+- Set the RTTI component's **Link.TIObject** property to your component
14+- Set the RTTI component's **Link.TIPropertyName** (from the drop-down list) to the property
15+- You can now edit the property interactively and see the effects of your changes at runtime (and sometimes designtime; depending on the component)
16+- Each RTTI control will try to invoke the appropriate property editor for your chosen property.
17+
18+So for instance, if the property is a StringList type, the RTTIButton would bring up the StringList editor, the RTTIMemo would display it - all without writing a line of code!
19+
20+## See Also
21+
22+- [explanation on RTTI for delphi that can apply to Free Pascal too](http://www.blong.com/Conferences/BorConUK98/DelphiRTTI/CB140.htm)
23+- [[Runtime Type Information (RTTI)]]
24+- [[RTTI tab]]
25+- [explanation on RTTI controls in Lazarus](https://www.freepascal.org/~michael/articles/#rtti)
26+
27+---
28+*From the Free Pascal wiki, page "RTTI controls", as it stood on 2020-06-10 after a change by Eric69, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history