TRVStyleTemplateCollection.AssignToStrings

<< Click to display table of contents >>

TRVStyleTemplateCollection.AssignToStrings

Assign style templates to a string list.

type

  TRVStyleTemplateKinds = set of TRVStyleTemplateKind;

procedure AssignToStrings(Strings: TStrings; AssignIds: Boolean;

  Kinds: TRVStyleTemplateKinds; ExcludeThisStyle: TRVStyleTemplate;

  OnlyPotentialParents: Boolean);

Parameters:

Strings – a destination string list. Names of style templates are added as items to this string list.

If AssignIds=True, the method saves Ids of style templates as Objects of Strings (type-casted to TObject).

Only style templates having Kinds belonging to Kinds are added.

If ExcludeThisStyle<>nil, it is not added to Strings.

If OnlyPotentialParents=True, and ExcludeThisStyle<>nil, only style templates that can be parents of ExcludeThisStyle are added to Strings (direct or indirect children of ExcludeThisStyle are not added).

Note: this method may be useful only if you display Names of all style templates to users (for example, you may implement localization of names of standard styles; in this case, you need to implement a similar function yourself).