IDimSelection.SelectAttributeRange

Syntax

SelectAttributeRange(

AttributeIndex: Integer;

MinValue: Variant;

MaxValue: Variant;

[Deselec: Boolean = False]);

Parameters

AttributeIndex. Index of the attribute in which value range selection must be changed.

MinValue. Attribute minimum value.

MaxValue. Attribute maximum value.

Deselec. Optional parameter which determines action with selection of elements having attribute value included in specified range. The default value is set to False, elements selection will be set. If True value is passed, the element selection is reset.

Description

The SelectAttributeRange method changes dictionary selection according to the range of attribute values, the index of which is passed by the AttributeIndex parameter.

Example

Executing of this example requires a form, a button named Button1, positioned on this form, the UiDimension component named UiDimension1 and any components, reflecting dictionary data downloaded into UiDimension1.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    DimInst: IDimInstance;
    Attrs: IDimAttributes;
    Attr: IDimAttribute;
    i: Integer;
Begin
    DimInst := UiDimension1.DimInstance;
    Attrs := DimInst.Dimension.Attributes;
    
For Each Attr In Attrs Do
        
If Attr = Attrs.Id Then
            
Break
        
End If;
            i := i + 
1;
    
End For;
    UiDimension1.Selection.SelectAttributeRange(i, 
110);
End Sub Button1OnClick;

After executing the example when the button is clicked, the selection of the dictionary elements downloaded into UiDimension1 is changed. The elements with ID value within [1,10] range are added.

See also:

IDimSelection