Contents Up Previous Next

The appearance and behaviour of a property list view

The property list, as seen in an increasing number of development tools such as Visual Basic and Delphi, is a convenient and compact method for displaying and editing a number of items without the need for one control per item, and without the need for designing a special form. The controls are as follows:

The concept of 'detailed editing' versus quick editing gives the user a choice of editing mode, so novice and expert behaviour can be catered for, or the user can just use what he feels comfortable with.

Behaviour alters depending on the kind of property being edited. For example, a boolean value has the following behaviour:

A list of strings may pop up a dialog for editing them, a simple string just allows text editing, double-clicking a colour property may show a colour selector, double-clicking on a filename property may show a file selector (in addition to being able to type in the name in the edit control), etc.

Note that the 'type' of property, such as string or integer, does not necessarily determine the behaviour of the property. The programmer has to be able to specify different behaviours for the same type, depending on the meaning of the property. For example, a colour and a filename may both be strings, but their editing behaviour should be different. This is why objects of type wxPropertyValidator need to be used, to define behaviour for a given class of properties or even specific property name. Objects of class wxPropertyView contain a list of property registries, which enable reuse of bunches of these validators in different circumstances. Or a wxProperty can be explicitly set to use a particular validator object.

The following screen shot of the property classes test program shows the user editing a string, which is constrained to be one of three possible values.


The second picture shows the user having entered a integer that was outside the range specified to the validator. Note that in this picture, the value list is hidden because it is not used when editing an integer.