Member attributes: Category

This attribute specifies the name of a category the corresponding property belongs to.

Syntax

category

sort‑prefix.category

sort‑prefix.category.sort‑suffix

Discussion

The attribute Category specifies a category for the corresponding property. Based on this information, Inspector window can better sort and group all related properties. In the simplest case, the attribute contains the name of the category, e.g. Visibility. Accordingly, the affected property will be grouped together with all other properties configured with the same category name. The user can thereupon expand and collapse the category by simply clicking on the expand button found on the left of the category name:

Appearance of categories in Inspector window. On the right, the category is expanded showing the enclosed properties.

In Inspector window categories are sorted alphabetically according to their names. By providing an optional sorting prefix, an explicit position for the category can be imposed. The sorting prefix is a text preceding the category name and separated from it by the sign . (dot). For example, A.Visibility determines a category named Visibility being sorted at position A relative to other properties and categories.

Similar to how the sorting of categories is determined, the sorting of the property itself can be controlled. For this purpose append a sorting suffix to the category name separated from it by a . (dot) sign. For example, A.Visibility.X will cause the affected property to be sorted at position X within the category Visibility. The category itself is sorted at position A.

To impose a dedicated sorting position for a property not associated to any category, just leave the category name and the sorting prefix empty, e.g. ..X.

Please note, specifying a category or/and sorting for a property has no effect on the functionality of the application. It affects only how the property is arranged and eventually grouped in the Inspector window.

Modify the attribute

To inspect or modify the value of a Category attribute, select first the affected property member. Thereupon, the attribute is listed in the middle area of Inspector. Please note the available assistant you can activate by clicking on the button right to the attribute. This assistant lists all categories existing already in your project: