IDimSelection.SelectAttributeRange

Fore Syntax

SelectAttributeRange(

AttributeIndex: Integer;

MinValue: Variant;

MaxValue: Variant;

[Deselec: Boolean = False]);

Fore.NET Syntax

SelectAttributeRange(

AttributeIndex: Integer;

MinValue: Object;

MaxValue: Object;

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.

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

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore Example. Use Fore.NET analogs instead of Fore components.

Imports Prognoz.Platform.Interop.Dimensions;

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    DimInst: IDimInstance;
    Attrs: IDimAttributes;
    Attr: IDimAttribute;
    i: Integer;
Begin
    DimInst := UiDimensionNet1.DimInstance;
    Attrs := DimInst.Dimension.Attributes;
    For Each Attr In Attrs Do
        If Attr = Attrs.Id Then
            Break
        End If;
            i := i + 1;
    End For;
    UiDimensionNet1.Selection.SelectAttributeRange(i, 110False);
End Sub button1_Click;

See also:

IDimSelection