Application Development and Automation 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: 
Read only

Custom container without border

Former Member
0 Likes
2,024

Hi All,

I am using the custom container for displaying the text on the screen, but i don't want to have the border and want it to be displayed like normal text. Please see the attached image. I don't want to  use the input/output field because some times text will be 5 lines longer.

I am using  cl_gui_custom_container and cl_gui_textedit classes.


IF go_cont1 IS INITIAL.

     CREATE OBJECT go_cont1

       EXPORTING

         container_name = 'CUS_CONTROL'.

     CREATE OBJECT go_text1

       EXPORTING

         parent = go_cont1.

   ENDIF.

   CALL METHOD go_textedit->set_text_as_stream

     EXPORTING

       text = text1.

   CALL METHOD go_text1->set_readonly_mode

     EXPORTING

       readonly_mode = '1'.

   CALL METHOD go_text1->set_statusbar_mode

     EXPORTING

       statusbar_mode         = 0

     EXCEPTIONS

       error_cntl_call_method = 1

       invalid_parameter      = 2

       OTHERS                 = 3.

   IF sy-subrc <> 0.

   ENDIF.

Please let me know if anyone knows how to solve this problem.

Thanks in advance,

Best regards,

Venkat

1 ACCEPTED SOLUTION
Read only

Juwin
Active Contributor
0 Likes
1,436

You can try using HTML control - CL_GUI_HTML_VIEWER - this doesn't have borders

Thanks,

Juwin

5 REPLIES 5
Read only

Former Member
0 Likes
1,436

Interesting question.

I don't have an answer but I found some comments that might help others to find a solution, hopefully.

There is an option called "style" when you create an instance of the class cl_gui_textedit. Unfortunately the different values that can be used is not documentated.

When you look at the code in the constructor method, you will find the below comments. I have no clue on where to find the info on WIN32 SDK.

* Set the window styles of the control when style parameter was not

* set with constructor call.

* For more information on the styles see WIN32 SDK

   IF style is initial.

* otherwise the control would be invisible and the mistake would be

* hard to find

     style = cl_gui_control=>ws_visible

             + cl_gui_control=>ws_child

             + cl_gui_control=>ws_clipsiblings.

   ENDIF.


Also you can check the package "SAPTEXTEDIT" which has many examples, may be one of those has what you are looking for.


Thanks,

Vikram.M

Read only

0 Likes
1,436

Style values : microsoft Window Styles

Read only

0 Likes
1,436

Sandra,

The link is broken. Leads to an page not found error.

Thanks,

Vikram.M

Read only

Read only

Juwin
Active Contributor
0 Likes
1,437

You can try using HTML control - CL_GUI_HTML_VIEWER - this doesn't have borders

Thanks,

Juwin