cancel
Showing results for 
Search instead for 
Did you mean: 

Tree UIBB: color /weight of font in a row

0 Kudos

Hi all,

I have a Tree UIBB with different levels.

I would like to set style='font-weight: bold; color: red' to text in rows of first level but I can't find a way to do this.

I can set only background color of cells using the cell_design_ref attribute of field description.

Any help?

Thank you,

Francesca

Accepted Solutions (1)

Accepted Solutions (1)

AbhishekSharma
Active Contributor
0 Kudos

Hi Francesca,

Have a look to this post if this helps .

Thanks-

Abhishek

0 Kudos

Hi Abhishek,

thank you for your response.

I can't modify font style : I read the post that you suggested but I think that it is the same way that I'm trying.

...or I didn't understand exactly I have to do

My code here below:

In get_definition method:

LOOP AT et_field_description ASSIGNING <ls_field_descr>.

  <ls_field_descr>-cell_design_ref = 'CELL_DESIGN_REF'.

ENDLOOP.

In get_data method, I want to change the font style only for sy-tabix row:

READ TABLE <tab> INDEX sy-tabix  ASSIGNING <wa>.

<wa>-cell_design_ref =  cl_wd_table_column=>e_cell_design-calendar_green.

This code will color the background of cell, but font.

What's wrong?

Best regards,

Francesca

AbhishekSharma
Active Contributor
0 Kudos

Hi Francesca,

This is not for LIST UIBB but for ALV see if this helps you..

I have not tried below code but might work for you.. You need to use TEXT_VIEW to get this done.

Get all columns and loop through.

alessandroiannacci.it/default.asp?det=10

lt_columns = lo_column_settings->get_columns( ).

LOOP AT lt_columns ASSIGNING <fs_columns>.

  lo_column = lo_column_settings->get_column( <fs_columns>-id ).

  CASE <fs_columns>-id.

  WHEN 'EXPIRED_PRO'. "Red text

    DATA: lr_text_view TYPE REF TO cl_salv_wd_uie_text_view.

    DATA: lr_ui TYPE REF TO cl_salv_wd_uie.

    lr_ui = lo_column->get_cell_editor( ).

    lr_text_view ?= lr_ui.

    lr_text_view->set_semantic_color( value = cl_wd_text_view=>e_semantic_color-negative ).

  ENDCASE.

ENDLOOP.



Have a look to this URL


http://help.sap.com/saphelp_erp60_sp/helpdata/en/b6/b7bc68306049bd8500362ce52b6def/content.htm





Thanks-

Abhishek

vaibhav_singh12
Participant
0 Kudos

I dont suppose you can change font. Unless you use formatted text view

Answers (0)