Search Locate Previous Next Contents

The Hidden Property

Properties with type ‘hidden’ are stored with the object, but are not shown on the property browser by the Designer. They can be used to store any array you choose, and may be maintained as a side effect of other (visible) properties. For example you might make a grid class where all the interaction took place by means of right-mouse menus directly run from the visible grid. You would replace the standard right-mouse menu with your own handler function and use this to update entries in a hidden property (say ‘gridfmt’) which could have any structure and inner complexity you choose.

This requires 3 service functions from the Designer ....

Designer.GetPropVal

takes the object id on the left and the property-name on the right. It will return the current value of the property, or the default value from the class if it has not yet been set.

Designer.SetPropVal

takes the id on the left and a two-element vector giving the property-name and new value on the right. Note that no check is made here whether or not this is a known property – it is simply stored with the object and saved with the dialogue definition on exit. If you reset a property to its default value, it is removed from the object definition.

Designer.ForceRedraw

This is monadic – it takes an object id and gets the object redrawn and the Property-browser updated.

For more details on replacing the standard menu actions, see the notes on Custom Properties in the next section..



Continue to: Class-Specific Property Types
© Copyright Causeway Graphical Systems Ltd 2001