cancel
Showing results for 
Search instead for 
Did you mean: 

Hiding header of a group

Former Member
0 Kudos

Hi,

Is there a way to hide the header of group UI element? If i set the property "Visible" to "None", it only removes the caption text but the header area still remains the same.

Any suggestions on how to do this?

Regards,

Prasath N

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Prasath,

I had the same problem and so far I did not like the idea of using other container.

Another option for you could be to declare your own header and to set it to the group. If the object reference is initial, the header is not visible.

But this solution might not work in some cases. The code would look:

METHOD wddomodifyview .

DATA: lo_group TYPE REF TO cl_wd_group.

DATA: caption type ref to CL_WD_CAPTION.

IF first_time EQ 'X'.

lo_group ?= view->get_element( 'MAINGROUP' ).

lo_group->set_header( caption ).

ENDIF.

ENDMETHOD.

Regards,

Kameliya

Former Member
0 Kudos

Thanks a lot to everyone.

Both the solutions (by Khandal and Kamelia) are working fine for me.

Thanks,

Prasath N

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

If you create Group Element dynamically using WDDOMODIFY method, it is possible to display group without header.

try following sample code in WDDOMODIFY method.


     DATA lo_container TYPE REF TO cl_wd_uielement_container.
     DATA lo_group TYPE REF TO cl_wd_group.

      lo_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).

      lo_group = cl_wd_group=>new_group( ).
      lo_group->set_design( cl_wd_group=>e_design-secondarycolor ).
      lo_group->set_height(  ' 100' ).
      lo_group->set_width( '100' ).
      cl_wd_grid_data=>new_grid_data( element = lo_group ).
      cl_wd_matrix_layout=>new_matrix_layout( container = lo_group ).

      lo_container->add_child( lo_group ).

rainer_liebisch
Contributor
0 Kudos

Hello Prasath,

the header will not be there if you create the group dynamically. Have a look at CL_WDR_MESSAGE_AREA~CREATE_MSG_LIST for an example.

Regards,

Rainer

Former Member
0 Kudos

Hi,

use transparent container instead which does not have header .

Former Member
0 Kudos

Hi,

Thanks Thomas and Sridevi.

If removing the header is not possible do we have a way to change the color of the header to a custom color? We have a custom color for our header area of the page (as per the company specifications). We would at least prefer to have the color of the header with our own custom color. Is this possible?

I am using a group because i need a border around the elements that i have in my group. I am unable to find a way to place a border around a transparent container. Or do we have some other solution for this?

Thanks,

Prasath N

thomas_szcs
Active Contributor
0 Kudos

Hi Prasath,

you can change the color by adjusting the corresponding entry in the stylesheet (theme).

Best regards,

Thomas

Former Member
0 Kudos

Hi Prasath,

It is not possible to set your own custom colour.

Try one thing though: Set the Visible property of Header UI element of the group to 'None'. In the Group set the relevant text for accessibility description.

Regards,

Wenonah

thomas_szcs
Active Contributor
0 Kudos

Hello Prasath,

the header is an integral part of a group. My suggestion is to use a different container, such as a TransparentContainer or ScrollContainer. They have no header.

Best regards,

Thomas