Skip to main content

I see in the documentation that a property ITEM-COLOR is available for tree-view controls.

I have tested this, as I want to show the user that something is wrong with some of the data in the tree-veiw control. Therefore, I need to mark some nodes in the tree view control with red text color. This works at first glance, the text really appears as red on the nodes I want to be red.

But; the outcome of the added node is not a real pointer to the node. It always gives "1" - one as pointer.

Therefore, I am not able to track the correct node in event-handling, and I cannot get the hidden-data for the node. Thus again means that my program does not find the information that the node is representing, and showing to user.

This statement:

modify tr-melding parent = ws-parentId
                                item-to-add = ws-fieldName
                                item-color = 13
                               giving ws-nodeId

is resulting in ws-nodeId = 1.

Always.

This statment:

modify tr-melding parent = ws-parentId

                                item-to-add = ws-fieldName
                                giving ws-nodeId

is resulting in ws-nodeId = 5687987 (for instance, this gives of course different values every time it is executed)

Is this an error, or have anyone been able to use the ITEM-COLOR and got the node Id correct?

Regards Dagl

I see in the documentation that a property ITEM-COLOR is available for tree-view controls.

I have tested this, as I want to show the user that something is wrong with some of the data in the tree-veiw control. Therefore, I need to mark some nodes in the tree view control with red text color. This works at first glance, the text really appears as red on the nodes I want to be red.

But; the outcome of the added node is not a real pointer to the node. It always gives "1" - one as pointer.

Therefore, I am not able to track the correct node in event-handling, and I cannot get the hidden-data for the node. Thus again means that my program does not find the information that the node is representing, and showing to user.

This statement:

modify tr-melding parent = ws-parentId
                                item-to-add = ws-fieldName
                                item-color = 13
                               giving ws-nodeId

is resulting in ws-nodeId = 1.

Always.

This statment:

modify tr-melding parent = ws-parentId

                                item-to-add = ws-fieldName
                                giving ws-nodeId

is resulting in ws-nodeId = 5687987 (for instance, this gives of course different values every time it is executed)

Is this an error, or have anyone been able to use the ITEM-COLOR and got the node Id correct?

Regards Dagl

Found the reason / solution... :

This statement works:

modify tr-melding parent = ws-parentId

                            item-to-add = ws-fieldName

                            giving ws-nodeId

                            item-color = ws-color

That means, moving "item-color = ws-color" after "gicing ws-nodeId" did the trick.....

Regards Dagl