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: 

tree based on class CL_GUI_COLUMN_TREE.

Former Member
0 Kudos

Hi,

i use a tree based on class CL_GUI_COLUMN_TREE.

Now i wish to adjust the column width of the first hierarchy column. It doesnt work with method "ADJUST_COLUMN_WIDTH" because is it a hierarchy column. Is there any other method? or how i must fill the "exporting" hierarchy_header when i create the object?

Stefan

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Use Method,

Call method list_Tree-> hierarchy_header_adjust_width

exceptions

failed = 1

cntl_system_error = 2

tree_has_no_headers = 3.

3 REPLIES 3

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

I'm showing that I do this using the hierarch_header when creating the object in one of my programs.

data:  hierarchy_header type treev_hhdr.

* Setup the hierarchy header
    hierarchy_header-heading = 'Transactions'.
    hierarchy_header-width   = 30.    "<<--  Set the width

* Create a tree control
    create object tree
      exporting
        parent                = container
        node_selection_mode   = tree->node_sel_mode_single
        item_selection        = ' '
        hierarchy_column_name = 'Column1'
        hierarchy_header      = hierarchy_header       <<---  Right here
     exceptions
        others                      = 7.

Regards,

Rich Heilman

Former Member
0 Kudos

Hi,

Use Method,

Call method list_Tree-> hierarchy_header_adjust_width

exceptions

failed = 1

cntl_system_error = 2

tree_has_no_headers = 3.

0 Kudos

Hi Ajay Tiwari,

this works, thanks for HIERARCHY_HEADER_ADJUST_WIDTH.

Stefan