| WORK WITH PROPERTIESVIEW IN DESIGN
TIME |
Home
> Articles
> PropertiesView |
 |
Working with PropertiesView in Design-time is quite easy. All we have
to do is to: Open Items Editor, Add and Arrange Items and finaly Set Properties
for single Item.
Headlines:
Open Items Editor
First you need to click on Berg tab
on Component Palette.
Click on PropertiesView component icon
and then click on Form. Component will be placed on form.
To start with adding items into PropertiesView simply double
click on component to open Items Editor, or click on
button beside Categories property in ObjectInspector, or chose "Items
Editor" from pop-up menu.

After that Delphi will show Items Editor window. With this
editor you can Add, Change, Delete or Move items in component.

Items in PropertiesView are organized in Tree structure.
Every Item can have Sub-items, and every Sub-item can have own Sub-items.
All top-level Items are called Categories, and you need to first add them.
Adding Items
To add category into component, you need to select "(Home)"
item in Items Editor. Then you click on one of buttons for adding items.
Each button represent one item type. When you click on first button you
will add TTextualItem, when you click on second you will add TSpinItem.
After we add one category, we can add a sub item into this Category.
To do this simply select this Parent Item in Items Editor and click again
on one of buttons for adding items. We only need to repeat this process
to add all desired items. If you like to change Items order you can use
Move Up
and Move Down
buttons. Also, you can use Drag & Drop to rearange Items in Design-time.
If you don't need some Items you can delete it with
button, or to delete all items with .
Here is a complete list of Item types with Item screenshot:
You can see Items
Hierarchy for more details.
Changing Item Properties
When you have add one item, you can change Item properties. Simply click
on this item in Items Editor and change properties in ObjectInspector.
If you want to change title of Item set "Caption" property.
For example for first category we can type "My Category", or
"Common Items", or "Font Properties"...
To put some initial Value inside Item, set "Value" property
of Item.
See Also:
Using TToolbarItem
|