‎2016 Sep 01 5:26 PM
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
‎2016 Sep 01 7:53 PM
You can try using HTML control - CL_GUI_HTML_VIEWER - this doesn't have borders
Thanks,
Juwin
‎2016 Sep 01 7:07 PM
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
‎2016 Sep 01 8:31 PM
‎2016 Sep 02 2:27 PM
Sandra,
The link is broken. Leads to an page not found error.
Thanks,
Vikram.M
‎2016 Sep 02 4:04 PM
microsoft Window Styles : https://msdn.microsoft.com/en-us/library/windows/desktop/ms632600%28v=vs.85%29.aspx
‎2016 Sep 01 7:53 PM
You can try using HTML control - CL_GUI_HTML_VIEWER - this doesn't have borders
Thanks,
Juwin