Products Downloads


French version


 

Directions assigned to method parameters:

(I)

Input,

(O)

Output,

(I/O)

Input and Output.

 

 

Adds an element to the treeview.

Syntax

CALL_METHOD TreeViewObjectName ADD ParentId Position Text AssociatedVariable AssociatedVariableLn DescriptionId ElementId ReturnCode

Parameters

NUM_BIN_4 ParentId

Identification code of the parent element (parent or sibling) (input parameter),

NUM_BIN_2 Position

Insertion point for the new element (input parameter),

ALPHA(250) Text

Text in the element (input parameter),

AssociatedVariable name

Information associated with the element. Variable of any Adelia type but a LIST, IMAGE,  *IDispatch POINTER or *IUnknown POINTER type. Supported array types are permitted.

This parameter may be omitted by entering *NONE instead (input parameter),

NUM_BIN_4 AssociatedVariableLn

This parameter is no longer used since version 8.2, PTF 06.

Enter *NONE,

NUM_BIN_2 DescriptionId

Identification code showing the associated variable's Adelia type (used to determine the Adelia type required for the AssociatedVariable parameter when the GET_ASSOCIATED_VARIABLE method is called.

This user specific identification code is used along with the GET_DESCRIPTION method). This parameter may be omitted by entering *NONE instead (only if AssociatedVariable is set to *NONE) (input parameter),

NUM_BIN_4 ElementId

Identification code of the new element added.

This parameter may be omitted by entering *NONE instead (output parameter),

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Possible values for the ParentId parameter

_TRV_ROOT

Root of the tree,

a NUM_BIN_4 type value

Unique element. This value is given when calls are made for methods or accesses to property values that return a valid element identification code (i.e. the ADD or GET_PARENT methods, or the SELECTED_ELEMENT or ACTION_ELEMENT properties).

Possible values for the Position parameter

_TRV_POS_BEFORE

ParentId will be a sibling element (it cannot be set to _TRV_ROOT).

The element created will be added before ParentId ,

_TRV_POS_AFTER

ParentId will be a sibling element (it cannot be set to _TRV_ROOT).

The element created will be added after ParentId ,

_TRV_POS_FIRST

ParentId will be a parent element.

The element created will be added at the head of the ParentId child elements,

_TRV_POS_LAST

ParentId will be a parent element.

The element created will be added to the end of the ParentId child elements.

Possible values for the return code

"-7"

The Adelia type of the associated variable is not permitted.

"-6"

Incorrect DescriptionId parameter value,

"-5"

The values of the TYPE_LENGTH and / or NB_DECIMALS_TYPE properties are incompatible with the value of the INPUT_CONTROL property,

"-4"

Error creating the element,

"-3"

Incorrect AssociatedVariableLn parameter value,

"-2"

Incorrect ParentId parameter value,

"-1"

Incorrect Position parameter value,

"0"

Internal error,

"1"

Operation completed successfully.

Conditions for use

If a list of images is associated with the object (created the first time the ADD_IMAGE method is called), the default image for the element created will be the one with the index 0 in the image list.

 

 

 

 

Adds an image to the image list associated with the object.

Syntax

CALL_METHOD TreeViewObjectName ADD_IMAGE ImageInfo ImageId ReturnCode

Parameters

ALPHA(250) or IMAGE ImageInfo

Image to be added to the list of images.

The parameter may be an alphanumeric variable containing the name and directory of the file containing the image. The acceptable file formats are: bmp, cut, emf, eps, ico, gif, iff, jpg, jp2, mng, pbm, pcx, pgm, png, ppm, psp, tif, tga, wmf.

 

The following formats only are supported with Adelia Mobile runtime: bmp, gif, jpg, png and ico.

The parameter can also be an IMAGE-type variable.

 

The content of the variable is either an image in DIB (Device-Independent Bitmap) format or a file containing an image with one of the following extensions: bmp, cut, emf, eps, ico, gif, iff, jpg, jp2, mng, pbm, pcx, pgm, png, ppm, psp, tif, tga, wmf (input parameter).

NUM_BIN_4 ImageId

Identification code of the image file just added (output parameter).

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Possible values for the return code

 

"-2"

Error while reading the image file,

"-1"

Error while adding the image,

"0"

Internal error,

"1"

Operation completed successfully.

Conditions for use

If a list of images is associated with the object (created the first time the ADD_IMAGE method is called), the default image for the element created will be the one with the index 0 in the image list.

 

 

Adds an image to the list of images associated with the object.

Syntax

CALL_METHOD TreeViewObjectName ADD_IMAGE_FROM_URL UrlAddress   ImageId   ReturnCode

Parameters

ALPHA (500) UrlAddress

URL address specifying the Image file.

Input parameter.

The following image file extensions are supported: bmp, cut, emf, eps, ico, gif, iff, jpg, jp2, mng, pbm, pcx, pgm, png, ppm, psp, tif, tga, wmf.

NUM_BIN_4 ImageId

The ID of the added image.

Output parameter.

NUM_BIN_4  ReturnCode

Return code for the operation.

Output parameter.

Possible values:

 

-2: Error while reading image file.

-1: Error while adding image.

 0: Internal error.

 1: Operation completed successfully.

>1: Error while executing http query.

 

Warning: In Cloud generation, the value of the return code has no significance.

 

Conditions for use 

If there exists a list of images associated with the object (created during the first call of the ADD_IMAGE or ADD_IMAGE_FROM_URL method), then the default image for the created element is the image with index 0 in the image list.

 

Note: This method is not implemented in Java and Mobile generation.

 

Browses through all the tree elements that have been assigned a root element.

 

Syntax

CALL_METHOD TreeViewObjectName BROWSE ElementId BrowseType ElementIdArray ReturnCode

Parameters

NUM_BIN_4 ElementId

Identification code for the tree's root element (input parameter),

NUM_BIN_2 BrowseType

Type of browsing route taken through the tree (input parameter),

NUM_BIN_4(n) ElementIdArray

Array containing the results of browsing through the tree. This array contains the identification codes of the elements browsed, in the order defined by the size of the array must match the number of elements in the ElementId root tree) (output parameter),

NUM_BIN_2 ReturnCode 

Return code for the operation (output parameter).

Possible values for the BrowseType parameter

_TRV_BROWSE_INFIX

Elements will be browsed in infix order (the subtree whose root is the first child of ElementId will be browsed first, followed by ElementId , and lastly the subtrees whose roots are the remaining children of ElementId ),

_TRV_BROWSE_PREFIX

Elements will be browsed in prefix order ( ElementId will be browsed first, followed by all the subtrees whose roots are the children of ElementId ),

_TRV_BROWSE_SUFFIX

Elements will be browsed in suffix order (the subtrees whose roots are the children of ElementId will be browsed first, followed by ElementId ).

Possible values for the return code

"-2"

Incorrect ElementIdArray array size,

"-1"

Incorrect ElementId parameter value,

"0"

Internal error,

"1"

Operation completed successfully.

Conditions for use

None.

Copies the tree for which the root is a given element.

Syntax

CALL_METHOD TreeViewObjectName COPY ElementId ReturnCode

Parameters

NUM_BIN_4 ElementId

Identification code of the root element (input parameter),

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Possible values for the return code

"-2"

The tree to be copied is empty,

"-1"

Incorrect ElementId parameter value,

"0"

Internal error,

"1"

Operation completed successfully.

Conditions for use When calling the COPY (or CUT) method, the copy of the tree previously copied (if any) is destroyed.

 

 

Copies the tree for which the root is a given element, then deletes it.

Syntax

CALL_METHOD TreeViewObjectName CUT ElementId ReturnCode

Parameters

NUM_BIN_4 ElementId

Identification code of the root element (input parameter),

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Possible values for the return code

"-2"

The tree to be cut is empty,

"-1"

Incorrect ElementId parameter value,

"0"

Internal error,

"1"

Operation completed successfully.

Conditions for use

When calling the COPY (or CUT) method, the copy of the tree previously copied is destroyed (if any).

 

 

Indicates whether any data items in a specified format are available among the data concerned by the current drag and drop operation. The format can be either one predefined in Windows or one defined by the developer.

Syntax

CALL_METHOD TreeViewObjectName DD_DATA_AVAILABLE Format Availability Return

Parameters

ALPHA(50) Format (I)

Name of the data format to be sought.

BOOL Availability (O)

This value is set to *TRUE if any data in the requested format is available.

NUM_BIN_4 ReturnCode (O)

Return code for the operation.

Possible values for the Format parameter

_CF_TEXT

Format for text data items in the ANSI format.

_CF_OEMTEXT

Format for text data items in the OEM format.

_CF_UNICODETEXT

Format for text data items in the UNICODE format.

_CF_DIB

Format for DIB (Device Independent Bitmap) data items.

Any string that does not begin with "CF_" for a format defined by the developer.

Possible values for the return code

 

_ERR_OK

Method run successfully.

_ERR_CTX_USE

Method used other than as part of an event enabled for it.

_ERR_INVALID_FORMAT

The specified format name does not match any data or is invalid.

Conditions for use

This method can only be used with the DD_EnterDrag, DD_DragOver and DD_Drop events.

 

Notes:

This method is not implemented by the Java generator.

It is not available in Mobile generation.

 

Erases any data stored in the object that could have been used for a drag and drop operation.

This method concerns the data previously created by the DD_WRITE_DATA method.

Syntax

CALL_METHOD TreeViewObjectName DD_CANCEL_DATA ReturnCode

Parameters

NUM_BIN_4 ReturnCode (O)

Return code for the operation.

Possible values for the return code

_ERR_OK

Method run successfully.

Conditions for use

None

 

Notes:

This method is not implemented by the Java generator.

It is not available in Mobile generation.

 

Initiates a drag and drop operation between a source object and a destination object using the data stored in the source object by the DD_WRITE_DATA method.

The relevant data can be either copied or moved to the destination object.

The set formed by this data is identified by a format name. The format can be either one predefined in Windows or one defined by the developer.

 

Note: Where a predefined format is used, only the first data item written by the DD_WRITE_DATA method is taken into consideration.

 

Syntax

CALL_METHOD TreeViewObjectName DD_EXECUTE_DRAG Format AllowedActions ActionDone ReturnCode

Parameters

ALPHA (50) Format (I)

Data format name.

NUM_BIN_4 AllowedActions (I)

Actions permitted in the destination object.

NUM_BIN_4 ActionDone (O)

Action performed in the destination object.

NUM_BIN_4 ReturnCode (O)

Return code for the operation.

Possible values for the Format parameter

_CF_TEXT

Format for text data items in the ANSI format.

_CF_OEMTEXT

Format for text data items in the OEM format.

_CF_UNICODETEXT

Format for text data items in the UNICODE format.

_CF_DIB

Format for DIB (Device Independent Bitmap) data items.

Any string that does not begin with "CF_" for a format defined by the developer, and which contains all the written data.

Possible values for the AllowedActions parameter

_DD_ACTION_COPY

The data is copied to the destination object.

_DD_ACTION_MOVE

The data is moved to the destination object (and deleted from the source object).

_DD_ACTION_COPY_MOVE

Combination of the above two actions.

Possible values for the ActionDone parameter

_DD_NO_ACTION

The user released the mouse button over an object that does not accept the data, or cancelled the operation by pressing Escape.

_DD_ACTION_COPY

The data must be copied to the destination object.

_DD_ACTION_MOVE

The data must be moved to the destination object (and deleted from the source object).

Possible values for the return code

_ERR_OK

Method run successfully.

_ERR_INVALID_PARAM

One or more parameters have invalid values.

_ERR_CTX_USE

Method used other than as part of an event enabled for it.

_ERR_NO_DATA

No data was stored for a drag and drop operation.

_ERR_INVALID_FORMAT

The specified format name is invalid.

Conditions for use

This method must be used with the DD_BeginDrag event.

 

Notes:

This method is not implemented by the Java generator.

It is not available in Mobile generation.

 

Reads the data transferred as part of the current drag and drop operation. This data is in fact a copy of the data written in the source object by the DD_WRITE_DATA method.

This method must be used in a loop to run through all the data for a given Adelia type.

All the data for a given type is read when the number of data items read is less than the number of data items to be read.

 

Notes:

    • Calling this method with an Adelia array containing x elements has the same effect as calling the method x times with an Adelia variable.
    • If the DD_WRITE_DATA method has been used to write x records each containing two ALPHA variables, the DD_READ_DATA method must be run twice, with the indexes (2x – 1) and 2x, in order to retrieve the strings in the nth record, or once with the index (2x-1) and an array capable of receiving two data items.
    • No distinction is made between packed and extended numerical variables, however long they are and however many decimal places they have. The values of numerical and extended variables may be truncated when they are read. With strings, the read operation will fail if the Adelia variable is too small to contain the string being read.

 

Syntax

CALL_METHOD TreeViewObjectName DD_READ_DATA Format AdeliaVar Index DataNumber ReturnCode

Parameters

ALPHA(50) Format (I)

Name of the data format to be sought.

Possible types for the AdeliaVar parameter (I):
ALPHA, DATE, TIME, NUM_E, NUM_P, NUM_BIN_2, NUM_BIN_4, BOOL, TIMESTAMP, IMAGE

Variable or array filled with data.

NUM_BIN_4 Index (I)

Index of the data to be read for a given type.
The first data item takes the index 1.

NUM_BIN_4 DataNumber (I/O)

Number of data items to be added.

With variables, this parameter must be 1, and with arrays, less than or equal to the number of elements in the array.

Once the method has been called, it contains the number of data items written.

NUM_BIN_4 ReturnCode (O)

Return code for the operation.

Possible values for the return code

 

_ERR_OK

Method run successfully.

_ERR_CTX_USE

Method used other than as part of an event enabled for it.

_ERR_INVALID_TYPE

A variable used in the method is not a suitable Adelia type.

_ERR_INVALID_PARAM

One or more parameters have invalid values.

_ERR_STRING_LEN

The data to be read includes a character string longer than the Adelia variable.

_ERR_VAR_NOT_AVAIL

The data to be read does not contain data of the specified Adelia type.

_ERR_INVALID_FORMAT

The specified format name does not match any data or is invalid.

Conditions for use:

This method can only be used with the DD_BeginDrag, DD_DragOver, DD_Drop.

 

Notes:

This method is not implemented by the Java generator.

It is not available in Mobile generation.

 

Adds data (i.e. the contents of the Adelia variables) to the data to be transferred by a drag and drop operation. This data is stored in the object until the end of the drag and drop operation, and is then deleted automatically.

 

Notes:

    • Calling this method with an array containing x elements has the same effect as calling the method x times with a variable containing the individual array elements.

    • No distinction is made between the extended and packed numerical data types.

 

Syntax

CALL_METHOD TreeViewObjectName DD_WRITE_DATA AdeliaVar DataNumber ReturnCode

Parameters

Possible types for the AdeliaVar parameter (I):

ALPHA, DATE, TIME, NUM_E, NUM_P, NUM_BIN_2, NUM_BIN_4, BOOL, TIMESTAMP, IMAGE

Variable or array containing the data.

NUM_BIN_4 DataNumber (I/O)

Number of data items to be added.

With variables, this parameter must be 1, and with arrays, less than or equal to the number of elements in the array.

Once the method has been called, it contains the number of data items written.

Possible values for the return code

_ERR_OK

Method run successfully.

_ERR_INVALID_TYPE

A variable used in the method is not a suitable Adelia type.

_ERR_INVALID_PARAM

One or more parameters have invalid values.

Conditions for use:

None.

 

Notes:

This method is not implemented by the Java generator.

It is not available in Mobile generation.

 

Deletes an element.

Syntax

CALL_METHOD TreeViewObjectName DELETE ElementId ReturnCode

Parameters

NUM_BIN_4 ElementId

Identification code of the element to be deleted (input parameter),

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Possible values for the return code

"-2"

Error while deleting the element,

"-1"

Incorrect ElementId parameter value,

"0"

Internal error,

"1"

Operation completed successfully.

Conditions for use

None.

 

 

Expands or collapses a given node element.

Syntax

CALL_METHOD TreeViewObjectName EXPAND ElementId Expands ReturnCode

Parameters

NUM_BIN_4 ElementId

Element identification code (input parameter),

BOOL Expands

*TRUE for expand, *FALSE for collapse (input parameter),

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Possible values for the return code

"-2"

Error expanding/collapsing the element,

"-1"

Incorrect ElementId parameter value,

"0"

Internal error,

"1"

Operation completed successfully.

Conditions for use

None.

 

 

Returns the variable associated with an element.

Syntax

CALL_METHOD TreeViewObjectName GET_ASSOCIATED_VARIABLE ElementId AssociatedVariable ReturnCode

Parameters

NUM_BIN_4 ElementId

Element identification code (input parameter),

AssociatedVariable name

Variable that is to contain the value of the associated variable (output parameter),

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Possible values for the return code

"-3"

No variable associated with the element ElementId ,

"-2"

Error while retrieving the element's associated variable,

"-1"

Incorrect ElementId parameter value,

"0"

Internal error,

"1"

Operation completed successfully.

Conditions for use

 

To use this method correctly, you must:

    • Associate the value of the IdDescription parameter with the AssociatedVariable parameter's Adelia type when the ADD method is called (you could, for example, adopt the following convention: 0 for the DATE type, 1 for the TIME type, 2 for the TIMESTAMP type, etc.),
    • When retrieving the variable associated with an element, first retrieve its description identification code (by calling the GET_DESCRIPTION method), then call the GET_ASSOCIATED_VARIABLE method, with the value of the AssociatedVariable parameter being a variable with an Adelia type that matches the value of the description identification code.

 

 

Retrieves the background RGB color for the text in a given element.

Syntax

CALL_METHOD TreeViewObjectName GET_BACKGROUND_COLOR ElementId Color ReturnCode

Parameters

NUM_BIN_4 ElementId

Element identification code (input parameter),

NUM_BIN_4 Color

Background RGB color (output parameter),

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Possible values for the return code

"-2"

Error while retrieving the background color,

"-1"

Incorrect ElementId parameter value,

"0"

Internal error,

"1"

Operation completed successfully.

Conditions for use None.

 

 

Returns the state of the checkbox associated with a given element.

Syntax

CALL_METHOD TreeViewObjectName GET_CHECK_BOX ElementId Checked ReturnCode

Parameters

NUM_BIN_4 ElementId

Element identification code (input parameter),

BOOL Checked

Status of the checkbox (*TRUE if checked, otherwise *FALSE) (output parameter),

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Possible values for the return code

"-3"

CHECK_BOX property not set to *TRUE,

"-2"

Error while retrieving the element's checkbox state,

"-1"

Incorrect ElementId parameter value,

"0"

Internal error,

"1"

Operation completed successfully.

Conditions for use

The CHECK_BOX property must be set to *TRUE.

 

 

Returns the child element for a given parent element.

Syntax

CALL_METHOD TreeViewObjectName GET_CHILD ElementId First ResultElementId ReturnCode

Parameters

NUM_BIN_4 ElementId

Element identification code (input parameter),

BOOL First

Position of the child element to be retrieved (*TRUE to retrieve the first child element, *FALSE to retrieve the last child element) (input parameter),

NUM_BIN_4 ResultElementId

Identification code of the result child element (may be set to _TRV_NONE if the element has no child) (output parameter),

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Possible values for the return code

"-1"

Incorrect ElementId parameter value,

"0"

Internal error,

"1"

Operation completed successfully.

Conditions for use

None.

 

 

Locates the first and last selected character in the element's input field.

Syntax

CALL_METHOD TreeViewObjectName GET_CURSOR_LOCATION ElementId StartPosition EndPosition ReturnCode

Parameters

NUM_BIN_4 ElementId

Element id (input parameter).

NUM_BIN_4 StartPosition

Position of the first selected character (output parameter),

NUM_BIN_4 EndPosition

Position of the first character after the last selected character (output parameter),

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Possible values for the return code

-2

You cannot enable Data Entry mode for the element,

-1

The line number set as a parameter is invalid,

0

Internal error,

1

Operation completed successfully.

Conditions for use 

None.

 

 

Note: This property is not implemented by the Java generator.

 

Returns the depth of a given node element. The depth of a tree whose root is the element e1 will be the length of its longest path (in terms of the number of elements) leading from e1.

 

Syntax

CALL_METHOD TreeViewObjectName GET_DEPTH ElementId Depth ReturnCode

Parameters

NUM_BIN_4 ElementId

Element identification code (input parameter),

NUM_BIN_2 Depth

Depth of the tree whose root is ElementId (output parameter),

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Possible values for the return code

"-2"

Error while calculating the depth,

"-1"

Incorrect ElementId parameter value,

"0"

Internal error,

"1"

Operation completed successfully.

Conditions for use

None.

 

 

Returns the value of the description identification code for a given element's associated variable.

Syntax

CALL_METHOD TreeViewObjectName GET_DESCRIPTION ElementId DescriptionId ReturnCode

Parameters

NUM_BIN_4 ElementId

Element identification code (input parameter),

NUM_BIN_2 DescriptionId

Description of the element's associated variable (output parameter),

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Possible values for the return code

"-3"

No description identification code associated with the element ElementId ,

"-2"

Error while retrieving the element's associated variable,

"-1"

Incorrect ElementId parameter value,

"0"

Internal error,

"1"

Operation completed successfully.

Conditions for use

None.

 

 

Retrieves the value that determines whether or not the user can drag and drop a given element.

Syntax

CALL_METHOD TreeViewObjectName GET_DRAG_DROP ElementId DragDrop ReturnCode

Parameters

NUM_BIN_4 ElementId

Element identification code (input parameter),

BOOL DragDrop

Value of the drag and drop authorization parameter (output parameter),

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Possible values for the return code

"-2"

Error while retrieving the drag and drop authorization status,

"-1"

Incorrect ElementId parameter value,

"0"

Internal error,

"1"

Operation completed successfully.

Conditions for use

None.

 

 

Retrieves the value that determines whether or not the user has the authorization to enter text for a given element.

Syntax

CALL_METHOD TreeViewObjectName GET_EDIT ElementId Edition ReturnCode

Parameters

NUM_BIN_4 ElementId

Element identification code (input parameter),

BOOL Edit

Edit authorization status value (output parameter),

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Possible values for the return code

"-2"

Error while retrieving the text input authorization status,

"-1"

Incorrect ElementId parameter value,

"0"

Internal error,

"1"

Operation completed successfully.

Conditions for use

None.

 

 

Returns the image associated with a specific status for a given element.

Syntax

CALL_METHOD TreeViewObjectName GET_IMAGE ElementId Status ImageId ReturnCode

Parameters

NUM_BIN_4 ElementId

Element identification code (input parameter),

NUM_BIN_4 ImageId

Identification code for the image associated with the element (output parameter),

NUM_BIN_2 Status

Status for the element (input parameter),

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Possible values for the Status parameter

 

_TRV_STATUS_SELECTED

The element has been selected,

_TRV_STATUS_NOT_SELECTED

The element is not selected,

_TRV_STATUS_COLLAPSED

The element is contracted,

_TRV_STATUS_EXPANDED

The element is expanded.

Possible values for the return code

"-4"

No image list associated with the object,

"-3"

Incorrect Status parameter value,

"-2"

Error while retrieving the image,

"-1"

Incorrect ElementId parameter value,

"0"

Internal error,

"1"

Operation completed successfully.

Conditions for use

None.

 

 

Returns the number of child elements for a given node element.

Syntax

CALL_METHOD TreeViewObjectName GET_NB_CHILDREN ElementId Nb ReturnCode

Parameters

NUM_BIN_4 ElementId

Element identification code (input parameter),

NUM_BIN_2 Nb

Number of children for the element (output parameter),

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Possible values for the return code

"-1"

Incorrect ElementId parameter value,

"0"

Internal error,

"1"

Operation completed successfully.

Conditions for use

None.

 

 

Returns the sibling element immediately after a given element.

Syntax

CALL_METHOD TreeViewObjectName GET_NEXT ElementId ResultElementId ReturnCode

Parameters

NUM_BIN_4 ElementId

Element identification code (input parameter),

NUM_BIN_4 ResultElementId

Identification code of the result sibling element (may be set to _TRV_NONE if there is no following element) (output parameter),

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Possible values for the return code

"-1"

Incorrect ElementId parameter value,

"0"

Internal error,

"1"

Operation completed successfully.

Conditions for use

None.

 

 

Returns a given element's parent element.

Syntax

CALL_METHOD TreeViewObjectName GET_PARENT ElementId ResultElementId ReturnCode

Parameters

NUM_BIN_4 ElementId

Element identification code (input parameter),

NUM_BIN_4 ResultElementId

Identification code of the result parent element (output parameter),

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Possible values for the return code

"-2"

Error while retrieving the parent element,

"-1"

Incorrect ElementId parameter value,

"0"

Internal error,

"1"

Operation completed successfully.

 

 

Conditions for use

None.

 

 

Returns the sibling element that precedes a given element.

Syntax

CALL_METHOD TreeViewObjectName GET_PREVIOUS ElementId ResultElementId ReturnCode

Parameters

NUM_BIN_4 ElementId

Element identification code (input parameter),

NUM_BIN_4 ResultElementId

Identification code of the result sibling element (may be set to _TRV_NONE if there is no previous element) (output parameter),

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Possible values for the return code

"-1"

Incorrect ElementId parameter value,

"0"

Internal error,

"1"

Operation completed successfully.

Conditions for use

None.

 

 

Returns the text associated with an element.

Syntax

CALL_METHOD TreeViewObjectName GET_TEXT ElementId Text ReturnCode

Parameters

NUM_BIN_4 ElementId

Element identification code (input parameter),

ALPHA(250) Text

Text in the element (output parameter),

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Possible values for the return code

"-2"

Error while retrieving the element's text,

"-1"

Incorrect ElementId parameter value,

"0"

Internal error,

"1"

Operation completed successfully.

Conditions for use

None.

 

 

Retrieves the RGB color for the text in a given element.

Syntax

CALL_METHOD TreeViewObjectName GET_TEXT_COLOR ElementId Color ReturnCode

Parameters

NUM_BIN_4 ElementId

Element identification code (input parameter),

NUM_BIN_4 Color

Text RGB color (output parameter),

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Possible values for the return code

"-2"

Error while retrieving the text color,

"-1"

Incorrect ElementId parameter value,

"0"

Internal error,

"1"

Operation completed successfully.

Conditions for use

None.

 

 

Tests whether or not two elements are related.

Syntax

CALL_METHOD TreeViewObjectName IS_RELATED ParentElementId ChildElementId IsRelated ReturnCode

Parameters

NUM_BIN_4 ParentElementId

Identification code of the parent element (input parameter),

NUM_BIN_4 ChildElementId

Identification code of the child element (input parameter),

BOOL IsRelated

*TRUE if ChildElementId is a descendant of ParentElementId , otherwise FALSE (output parameter),

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Possible values for the return code

"-2"

Incorrect ParentElementId parameter value,

"-1"

Incorrect ChildElementId parameter value,

"0"

Internal error,

"1"

Operation completed successfully.

Conditions for use

None.

 

 

Pastes a tree (previously copied by calling the COPY or CUT method) at a specified position.

Syntax

CALL_METHOD TreeViewObjectName PASTE ParentId Position ReturnCode

Parameters

NUM_BIN_4 ParentId

Identification code of the related element (parent or sibling) (input parameter),

NUM_BIN_2 Position

Insertion point for the new element (input parameter),

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Possible values for the position

_TRV_POS_BEFORE

ParentId will be a sibling element (it cannot be set to _TRV_ROOT).

The element created will be added before ParentId ,

_TRV_POS_AFTER

ParentId will be a sibling element (it cannot be set to _TRV_ROOT).

The element created will be added after ParentId ,

_TRV_POS_FIRST

ParentId will be a parent element.

The element created will be added at the head of the ParentId children,

_TRV_POS_LAST

ParentId will be a parent element.

The element created will be added to the end of the ParentId children.

Possible values for the return code

 

"-3"

Incorrect ParentId parameter value,

"-2"

Incorrect Position parameter value,

"-1"

No tree has been copied to the clipboard,

"0"

Internal error,

"1"

Operation completed successfully.

Conditions for use

When calling the COPY (or CUT) method, the copy of the tree previously copied (if any) is destroyed.

Sets the variable associated with an element.

Syntax

CALL_METHOD TreeViewObjectName SET_ASSOCIATED_VARIABLE ElementId AssociatedVariable AssociatedVariableLn ReturnCode

Parameters

NUM_BIN_4 ElementId

Element identification code (input parameter),

AssociatedVariable name

Information associated with the element. Variable of any Adelia type but a LIST, IMAGE, *IDispatch POINTER or *IUnknown POINTER type. Supported array types are permitted,

NUM_BIN_4 AssociatedVariableLn

This parameter is no longer used since version 8.2, PTF 06.

Enter *NONE,

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Possible values for the return code

"-4"

Incorrect AssociatedVariable parameter value,

"-3"

Incorrect AssociatedVariableLn parameter value,

"-2"

Error while setting the element's associated variable,

"-1"

Incorrect ElementId parameter value,

"0"

Internal error,

"1"

Operation completed successfully.

Conditions for use

Check that the new associated variable's Adelia type still matches the value in the description identification code. If this is no longer the case, use the SET_DESCRIPTION method to change the value of the identification code.

 

 

Sets the background RGB color for the text in a given element.

Syntax

CALL_METHOD TreeViewObjectName SET_BACKGROUND_COLOR ElementId Color ReturnCode

Parameters

NUM_BIN_4 ElementId

Element identification code (input parameter),

NUM_BIN_4 Color

Background RGB color (input parameter),

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Predefined values for the color

_TRV_COL_SYSTEM

"system" color,

_TRV_COL_BLACK

"black" color,

_TRV_COL_BLUE

"blue" color,

_TRV_COL_CYAN

"cyan" color,

_TRV_COL_GREEN

"green" color,

_TRV_COL_MAGENTA

"magenta" color,

_TRV_COL_RED

"red" color,

_TRV_COL_WHITE

"white" color,

_TRV_COL_YELLOW

"yellow" color,

_TRV_COL_DARKBLUE

"dark blue" color,

_TRV_COL_DARKCYAN

"dark cyan" color,

_TRV_COL_DARKGREEN

"dark green" color,

_TRV_COL_PURPLE

"purple" color,

_TRV_COL_DARKRED

"dark red" color,

_TRV_COL_DARKYELLOW

"dark yellow" color,

_TRV_COL_GREY

"grey" color,

_TRV_COL_DARKGREY

"dark grey" color.

Possible values for the return code

"-2"

Error while setting the background color,

"-1"

Incorrect ElementId parameter value,

"0"

Internal error,

"1"

Operation completed successfully.

Conditions for use

None.

 

 

Selects a block of characters in the element's input field.

Syntax

CALL_METHOD TreeViewObjectName SET_CURSOR_LOCATION ElementId StartPosition EndPosition ReturnCode

Parameters

NUM_BIN_4 ElementId

Element id (input parameter).

NUM_BIN_4 StartPosition

Position of the first character that you want to select (input parameter).

If StartPosition is set to -1 the text is deselected and the cursor moves to the end of the line.

NUM_BIN_4 EndPosition

Position of the first character following the last character that you want to select (input parameter).

If EndPosition is set to -1 the complete text is selected.

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Possible values for the return code

-2

You cannot enable Data Entry mode for the element,

-1

The line number set as a parameter is invalid,

0

Internal error,

1

Operation completed successfully.

Conditions for use

None.

 

Note: This property is not implemented by the Java generator.

 

Sets the status of the checkbox associated with a given element.

Syntax

CALL_METHOD TreeViewObjectName SET_CHECK_BOX ElementId Checked ReturnCode

Parameters

NUM_BIN_4 ElementId

Element identification code (input parameter),

BOOL Checked

Checkbox status (*TRUE if checked, otherwise *FALSE) (input parameter),

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Possible values for the return code

"-3"

CHECK_BOX property not set to *TRUE,

"-2"

Error while setting the element's checkbox state,

"-1"

Incorrect ElementId parameter value,

"0"

Internal error,

"1"

Operation completed successfully.

Conditions for use

The CHECK_BOX property value must be set to *TRUE.

 

 

Sets the value of the description identification code for a given element's associated variable.

Syntax

CALL_METHOD TreeViewObjectName SET_DESCRIPTION ElementId DescriptionId ReturnCode

Parameters

NUM_BIN_4 ElementId

Element identification code (input parameter),

NUM_BIN_2 DescriptionId

Description of the element's associated variable (input parameter),

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Possible values for the return code

"-2"

Error while setting the element's associated variable,

"-1"

Incorrect ElementId parameter value,

"0"

Internal error,

"1"

Operation completed successfully.

Conditions for use

None.

 

 

Specifies whether or not the user is authorized to drag and drop a given element.

Syntax

CALL_METHOD TreeViewObjectName SET_DRAG_DROP ElementId DragDrop ReturnCode

Parameters

NUM_BIN_4 ElementId

Element identification code (input parameter),

BOOL DragDrop

*TRUE to authorize drag and drop procedures, otherwise *FALSE (input parameter),

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Possible values for the return code

"-2"

Error while setting the drag and drop authorization status,

"-1"

Incorrect ElementId parameter value,

"0"

Internal error,

"1"

Operation completed successfully.

Conditions for use

None.

 

 

Specifies whether or not the user is authorized to enter text for a given element.

Syntax

CALL_METHOD TreeViewObjectName SET_EDIT ElementId Edition ReturnCode

Parameters

NUM_BIN_4 ElementId

Element identification code (input parameter),

BOOL Edit

*TRUE to enable input, otherwise *FALSE (input parameter),

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Possible values for the return code

"-2"

Error while setting the text input authorization status,

"-1"

Incorrect ElementId parameter value,

"0"

Internal error,

"1"

Operation completed successfully.

Conditions for use

None.

 

 

Places the focus on the object.

Syntax

CALL_METHOD TreeViewObjectName SET_FOCUS

Conditions for use

None.

 

 

Defines an image as being associated with a specific status of a given element. The image will appear to the left of the element's text when it is in the specified status.

Syntax

CALL_METHOD TreeViewObjectName SET_IMAGE ElementId ImageId Status ReturnCode

Parameters

NUM_BIN_4 ElementId

Element identification code (input parameter),

NUM_BIN_4 ImageId

Identification code of the image associated with the element (input parameter),

NUM_BIN_2 Status

Element status (input parameter),

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Possible values for the Status parameter

_TRV_STATUS_SELECTED

The element has been selected,

_TRV_STATUS_NOT_SELECTED

The element is not selected,

_TRV_STATUS_COLLAPSED

The element is contracted,

_TRV_STATUS_EXPANDED

The element is expanded,

_TRV_ALL_STATUSES

Gathers all statuses previously described.

The order of priority of the various states (in ascending order) for a given element is:

_TRV_STATUS_NOT_SELECTED, _TRV_STATUS_EXPANDED, _TRV_STATUS_COLLAPSED, _TRV_STATUS_SELECTED.

Possible values for the return code

"-4"

Incorrect Status parameter value,

"-3"

Error while setting the image,

"-2"

Incorrect ElementId parameter value,

"-1"

Incorrect IdImage parameter value,

"0"

Internal error,

"1"

Operation completed successfully.

Conditions for use

None.

 

 

Sets the text associated with an element.

Syntax

CALL_METHOD TreeViewObjectName SET_TEXT ElementId Text ReturnCode

Parameters

NUM_BIN_4 ElementId

Element identification code (input parameter),

ALPHA(250) Text

Text to be set for the element (input parameter),

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Possible values for the return code

"-2"

Error setting the element's text,

"-1"

Incorrect ElementId parameter value,

"0"

Internal error,

"1"

Operation completed successfully.

Conditions for use

None.

 

 

Sets the RGB color for the text in a given element.

Syntax

CALL_METHOD TreeViewObjectName SET_TEXT_COLOR ElementId Color ReturnCode

Parameters

NUM_BIN_4 ElementId

Element identification code (input parameter),

NUM_BIN_4 Color

Text RGB color (input parameter),

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Predefined values for the color

 

_TRV_COL_SYSTEM

"system" color,

_TRV_COL_BLACK

"black" color,

_TRV_COL_BLUE

"blue" color,

_TRV_COL_CYAN

"cyan" color,

_TRV_COL_GREEN

"green" color,

_TRV_COL_MAGENTA

"magenta" color,

_TRV_COL_RED

"red" color,

_TRV_COL_WHITE

"white" color,

_TRV_COL_YELLOW

"yellow" color,

_TRV_COL_DARKBLUE

"dark blue" color,

_TRV_COL_DARKCYAN

"dark cyan" color,

_TRV_COL_DARKGREEN

"dark green" color,

_TRV_COL_PURPLE

"purple" color,

_TRV_COL_DARKRED

"dark red" color,

_TRV_COL_DARKYELLOW

"dark yellow" color,

_TRV_COL_GREY

"grey" color,

_TRV_COL_DARKGREY

"dark grey" color.

Possible values for the return code

"-2"

Error while setting the text color,

"-1"

Incorrect ElementId parameter value,

"0"

Internal error,

"1"

Operation completed successfully.

Conditions for use

None.

 

 

Sorts the elements in the tree whose root is a given element. The sorting operation affects the texts in the various elements.

Syntax

CALL_METHOD TreeViewObjectName SORT ElementId Asc Depth ReturnCode

Parameters

NUM_BIN_4 ElementId

Identification code for the root element in the tree to be sorted (input parameter),

BOOL Asc

Sorting order (*TRUE for ascending, *FALSE for descending) (input parameter),

BOOL Depth

*TRUE if the sorting procedure is to apply to all elements in the tree, *FALSE if it is to concern only the children of the tree's root element),

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

Possible values for the return code

"-2"

Error while setting the text color,

"-1"

Incorrect ElementId parameter value,

"0"

Internal error,

"1"

Operation completed successfully.

 

 

 



↑ Top of page