Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the color of the line in in Tree

Former Member
0 Kudos

Hello all,

I am using class CL_GUI_ALV_TREE in my program.

In certain cases i need to change the color of the line in the tree.

Can any post some example code here. My problem is i know there parameter item_layout in method add_node but i am unable to know the possible parameters.

Can any one help me.

It would be appreciated if some one post some examples.

Regards,

Lisa

3 REPLIES 3

Former Member
0 Kudos

Hello,

Check this you may find some use full information

0 Kudos

I am asking to change color of line in tree not changing image of node or anyother.

Regards,

Lisa

0 Kudos

Hi,

You can change the color, by setting the "Style" field in the node_layout structure:

DATA:

ls_node_layout TYPE lvc_s_layn.

ls_node_layout-style = '4'. "Header_Style - BLUE

CALL METHOD tree1->add_node

EXPORTING

i_relat_node_key = p_relat_key2

i_relationship = cl_gui_column_tree=>relat_last_child

i_node_text = l_node_text

is_node_layout = ls_node_layout

is_outtab_line = ls_blen

it_item_layout = lt_item_layout

IMPORTING

e_new_node_key = p_node_key.

Cheers,