IDimOrmCondition.SetTextCriteria

Syntax

SetTextCriteria(Value: IDimTextCriteria);

Parameters

Value. Search condition.

Description

The SetTextCriteria method determines condition of search in attribute text.

Example

In the example the form contains the following components: UiDimension, DimensionTree, Button, EditBox. The OnClick event is described for the button.

Class UserForm: Form

cmdSearch: Button;

uidim: UiDimension;

tree: DimensionTree;

txtPattern: EditBox;

 

Sub Button1OnClick(Sender: Object; Args: IEventArgs);

Var

pMan : IDimOrmManager;

pClass : IDimOrmClass;

pCondition : IDimOrmCondition;

pCriteria : IDimTextCriteria;

Begin

pMan := New DimOrmManager.Create;

pClass := pMan.CreateClass(uidim.Dimension);

pCondition := pClass.CreateCondition;

pCriteria := New DimTextCriteria.Create;

pCriteria.CriteriaOptions := TextCriteriaOptions.FreeText Or TextCriteriaOptions.SearchStringAttributes;

pCriteria.Text := txtPattern.Text;

pCondition.SetTextCriteria(pCriteria);

pCondition.SelectElements(tree.Selection);

End Sub Button1OnClick;

End Class UserForm;

Start the form, type in the text to be searched, and click the button; list selection changes: only the elements, attributes of which contain the entered text, are selected.

See also:

IDimOrmCondition