RdsDictionaryBoxEventArgs.Create

Syntax

Create(Key: Integer);

Parameters

Key. Key of the MDM dictionary element relative to which any action is performed.

Description

The Create method creates argument of the event that occurs when any action is performed on the elements of the MDM dictionary displayed in the RdsDictionaryBox component.

Example

Executing the example requires a form, the button named Button1, the RdsDictionaryBox component named RdsDictionaryBox1, and the UiRdsDictionary component that is a data source for RdsDictionaryBox1.

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

Var

Inst: IRdsDictionaryInstance;

Elements: IRdsDictionaryElements;

Key: Integer;

Elem: IRdsDictionaryBoxEventArgs;

Begin

Inst := RdsDictionaryBox1.Source.Instance;

Elements := Inst.Elements;

Key := Elements.Item(Elements.Count - 1).Key;

Elem := New RdsDictionaryBoxEventArgs.Create(Key);

RdsDictionaryBox1.OnSelectionChanged(RdsDictionaryBox1, Elem);

End Sub Button1OnClick;

After executing the example, pressing the button generates event of changing focus for the last element of elements tree. Actually, focus is not changed.

See also:

RdsDictionaryBoxEventArgs