2010 Apr 21 5:17 AM
Hello Experts,
I have created a customer container and using class cl_gui_textedit to have a text editor on the screen and saving the text as standard text.
Problem is when i save the test say TEST TEST TEST TEST , it get saved properly but when i display it the last word is getting shifted to next line
like TEST TEST TEST
TEST
and vertical scroll bar is getting displayed, but if i go back and come again the scroll bar is no more there and text is displayed properly TEST TEST TEST TEST.
I couldnt find any method to control the scroll bar ,
request for a solution and thanks in advance .
Thanks
Pramod Adhav
Hello Experts,
I have created a customer container and using class cl_gui_textedit to have a text editor on the screen and saving the text as standard text.
Problem is when i save the test say TEST TEST TEST TEST , it get saved properly but when i display it the last word is getting shifted to next line
like TEST TEST TEST
TEST
and vertical scroll bar is getting displayed, but if i go back and come again the scroll bar is no more there and text is displayed properly TEST TEST TEST TEST.
I couldnt find any method to control the scroll bar ,
request for a solution and thanks in advance .
Thanks
Pramod Adhav
2010 Apr 21 6:06 AM
Hi,
Try by using this method SET_WORDWRAP_BEHAVIOR
(Use this method to set the behavior of the line break. I am not sure which parameter you have to use )
call method textedit set_wordwrap_behavior
exporting
wordwrap_to_linebreak_mode = '0'. " (also Try by '1')
exceptions
error_cntl_call_method = 1.
Hope this will help you
Regrads,
Raghava Channooru
2010 Apr 21 7:02 AM
2011 May 11 4:01 PM
Maybe your container lenght is smaller than 72 chars (stantard for sapscript and SO10).
So when you save it you can see the text on the same line, and then when displaying on smaller line lenght it makes a line return.
Anyway I haven't had any problem with it. Here I show you how I usually define it when used:
CREATE OBJECT GV_TEXT_EDITOR
EXPORTING
PARENT = GV_SPLITTER->BOTTOM_RIGHT_CONTAINER
WORDWRAP_MODE = CL_GUI_TEXTEDIT=>WORDWRAP_AT_WINDOWBORDER
WORDWRAP_TO_LINEBREAK_MODE = CL_GUI_TEXTEDIT=>FALSE
EXCEPTIONS
ERROR_CNTL_CREATE = 1
ERROR_CNTL_INIT = 2
ERROR_CNTL_LINK = 3
ERROR_DP_CREATE = 4
GUI_TYPE_NOT_SUPPORTED = 5.And some useful options:
*READ ONLY
call method gv_text_editor->set_readonly_mode
exporting
readonly_mode = gv_text_editor->true
exceptions
error_cntl_call_method = 1
invalid_parameter = 2
others = 3.
*NO TOOLBAR
call method gv_text_editor->SET_TOOLBAR_MODE
exporting
TOOLBAR_MODE = gv_text_editor->false
exceptions
error_cntl_call_method = 1
invalid_parameter = 2
others = 3.
*NO STATUS BAR (bottom one)
call method gv_text_editor->SET_STATUSBAR_MODE
exporting
STATUSBAR_MODE = gv_text_editor->false
exceptions
error_cntl_call_method = 1
invalid_parameter = 2
others = 3.
I hope it helps
Regards,
John
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |