Sign in Join
Wiki copytemporary

IDE Window: Object Inspector: what changed

Revision 2 to 3. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11# Object Inspector
22
33![](/wiki-images/b/ba/ObjectInspectormacOS.png)
44
55The "Object Inspector" window allows you to explore and edit the properties of objects. Objects here are TPersistent descendants like a TForm or a TButton or a TOpenDialog.
66
77On the top there is a tree showing the components of the currently edited designer form (or datamodule or frame or whatever).
88
99The biggest part of the Object Inspector are the 3 property grids called 'Properties', 'Events' and 'Favorites'. Each property grid show a subset of the published properties of the selected components.
1010
1111The Object Inspector is a useful tool for debugging your own programs. How to add the Object Inspector to your own programs is demonstrated in examples/objectinspector.
1212
1313# Keyboard Shortcuts
1414
1515| Shortcut | Description |
1616|--------------|-------------------------|
1717| Up, Down | Navigate rows |
1818| Alt + Left | Collapse level |
1919| Alt + Right | Expand level |
2020| Ctrl + Enter | Cycle enumerated values |
2121
2222You can use keyboard for fast Property Name search and edit.
2323
2424Let's assume you want to modify Form's Caption and Width properties
2525
26-`- Click Form.`\
27-`- Go to Object inspector (caret is on Property Value column).`\
28-`- Press Tab to switch to Property Name column (caret will disappear from Value column).`\
29-`- Type "caption". Property row "Caption" will be found.`\
30-`- Press Tab or Enter to go to Property Value and edit it.`
26+``` pascal
27+- Click Form.
28+- Go to Object inspector (caret is on Property Value column).
29+- Press Tab to switch to Property Name column (caret will disappear from Value column).
30+- Type "caption". Property row "Caption" will be found.
31+- Press Tab or Enter to go to Property Value and edit it.
32+```
3133
32-`- Press Tab to switch to Property Name column again.`\
33-`- Type "width". Width row will be found.`\
34-`- Press Tab or Enter and edit it.`
34+``` pascal
35+- Press Tab to switch to Property Name column again.
36+- Type "width". Width row will be found.
37+- Press Tab or Enter and edit it.
38+```
3539
3640If you misspelled property name you can press Esc and retype it. Or you can use Backspace to remove few last chars.
3741
3842# Object Inspector Popup Menu
3943
4044![](/wiki-images/6/65/ObjectInspectorPopupMenu.png)
4145
4246Right-click in the Properties tab of the Object Inspector to get the Object Inspector's Popup Menu. The items on the Popup Menu are described below.
4347
4448## Set to default
4549
4650Set the property value to the default value. For example:
4751
48-` property Position: TPosition read FPosition write SetPosition default poDesigned;`
52+```text
53+ property Position: TPosition read FPosition write SetPosition default poDesigned;
54+```
4955
5056Here poDesigned is the default.
5157
5258Note: Not every property has a default value. Default values defined by the **stored** functions are ignored by this function.
5359
5460## Add to Favorites
5561
5662Add the property to the Favorites tab of the Object Inspector.
5763
5864## View restricted properties
5965
6066Opens the [[IDE Window: Restriction Browser|Restriction Browser]].
6167
6268## Undo
6369
6470Discard changes to the property edit field and restore the value of the current property. Do not confuse this with the value from the disk.
6571
6672## Jump to declaration of...
6773
6874Jump to the source declaration of the property. This will be the last one. For example TForm.Left is published in the class TForm and defined in TControl. You can jump easily to the other declaration, by doing a find declaration on the name again and again, until you are the lowest definition (Alt+Up or Ctrl+LeftClick). You can jump back with Ctrl+H.
6975
7076## Show Component Tree
7177
7278Show or hide the component tree at the top of the Object Inspector.
7379
7480## Show Property Filter
7581
7682Show or hide the Properties (filter) edit field above the Properties tab of the Object Inspector.
7783
7884## Show hints
7985
8086Enable or disable the showing of hints. Hints are shown, when the mouse stops for a few seconds over a property.
8187
8288## Show Information Box
8389
8490Enable or disable the showing of the yellow background Information Box at the bottom of the Object Inspector. The Information Box describes the currently highlighted property and may contain links to related properties and the package to which the component belongs. If the box is not big enough to show the full description, it can be scrolled.
8591
8692## Show Status Bar
8793
8894Enable or disable the showing of the Status Bar on the last line at the bottom of the Object Inspector.
8995
9096## Options
9197
9298Configure some options of the Object Inspector including the colours used.
9399
94100---
95101*From the Free Pascal wiki, page "IDE Window: Object Inspector", as it stood on 2020-08-30 after a change by FTurtle, 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