The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Unit: SDL_dstruct
Class: TFeatureMatrix
Declaration: property FeatProps [fix: integer]: TFeatProps;
{ TFeatProps = record
                 FeatNum      : integer;
                 FeatName     : string[20];
                 FeatKind     : TFeatKind;
                 Comment      : string[60];
                 PresetValues : string;
                 Sorted       : boolean;
                 GUIElem      : pointer;

The array property FeatProps defines the types of the features (field FeatKind) as well as a few additional header fields which can be used by the user. The parameter fix specifies the index of the feature (valid range: 1..NFeatures). Each feature is characterized by the following fields:

Field Explanation
FeatNum Each feature can have a user-defined feature number. This number can be arbitrarily defined by the user and is not used by the TFeatureMatrix class.
FeatName Name of the feature. The name of the feature is restricted to a maximum of 20 characters.
FeatKind Type of the feature. This property controls the type of the feature: integer, double precision floating point numbers, tri-state values and strings are allowed (see TFeatKind for details).
Comment An arbitrary comment. Maximum length is 60 characters.
PresetValues Sometimes the range of allowed values of a feature is restricted to a selection of predefined values. In this case you can define preset values and store them in the feature properties.
Sorted This field indicates whether the preset values should be displayed in sorted order. Please note that this field is not used by the class, thus you may use it for other purposes as well.
GUIElem Sometimes certain features are related to particular controls of the user interface. The GUIElem field is intended to store a pointer to the corresponding control.

Example: The following code snippet shows how to set the feature properties of feature 3 of the feature matrix "FM":
  FM         : TFeatureMatrix;
  FProps     : TFeatProps;
ClearFeatProps(FProps);  // set default values
FProps.FeatNum := 412;
FProps.FeatName := 'No.Apples';
FProps.FeatKind := fkinteger;
FM.FeatProps[3] := FProps; // set properties of feature 3

Last Update: 2018-Mär-03