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....



FeatProps


Unit: SDL_dstruct
Class: TFeatureMatrix
Declaration: property FeatProps [fix: integer]: TFeatMatProps;
{ TFeatMatProps = class
               private
                 (...)
               public
                 constructor Create (AOwner: TComponent);
                 destructor  Destroy;
                 procedure Assign(Source: TPersistent);
                 procedure Clear;
                 property FeatNum: integer;
                 property FeatName: string;
                 property FeatKind: TFeatKind;
                 property Comment: string;
                 property PresetValues: string;
                 property Sorted: boolean;
                 property GUIElem: pointer;
               end;

The array property FeatProps defines the types of the features (property FeatKind) as well as a few additional header properties 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":
var
  FM         : TFeatureMatrix;
...
...
FM.FeatProps[3].Clear;  // set default values
FM.FeatProps[3].FeatNum := 412;
FM.FeatProps[3].FeatName := 'No.Apples';
FM.FeatProps[3].FeatKind := fkinteger;
...



Last Update: 2023-Feb-06