‎2006 Aug 14 3:43 AM
Hi experts,
Iam working on Dialog programming.
I have created long text(container) using custom control.
When display mode i want to disable this <b>container</b>.
Can any one tell me how i can i <b>disable</b>?Is it possible using Loop at screen?
Thanks
kaki
‎2006 Aug 14 8:34 AM
If you are using cl_gui_textedit you can use the set_readonly_mode method:
data: editor_obj type ref to cl_gui_textedit,
editor_cont type ref to cl_gui_custom_container.
call method editor_obj->set_readonly_mode
exporting readonly_mode = cl_gui_textedit=>true.
‎2006 Aug 14 6:07 AM
Hai,
No there is no screen grouping in custom container, but you can enable & disable a control using the container methods (<b>SET_ENABLE</b>) of CL_GUI_CUSTOM_CONTAINER. Try it.
‎2006 Aug 14 6:51 AM
to disable the long text . use
protect_lines method of class cl_gui_textedit.
‎2006 Aug 14 7:17 AM
hi,
use class CL_GUI_TEXTEDIT -
method: SET_ENABLE_EDITING_PROTECTED
Andreas
‎2006 Aug 14 8:35 AM
Hi experts,
My code is like this..
DATA: txt TYPE REF TO cl_gui_textedit.
DATA: from_idx TYPE i.
DATA: to_idx TYPE i.
CALL METHOD txt->protect_lines
EXPORTING
from_line = from_idx
to_line = to_idx.
protect_mode = txt->true
ENABLE_EDITING_PROTECTED_text = txt->true.
why it is not working?
kaki
‎2006 Aug 14 8:38 AM
Hi Neil Woodruff ,
It is working
Thanks a lot.Full points alloted..
cheers
kaki
‎2006 Aug 14 8:44 AM
I would use the other method but this one should be ok too...
1. what values are you passing in the parameters
2. have you 'created' the txt object and it's parent container? ie.
for these object declarations:
data: editor_obj type ref to cl_gui_textedit,
editor_cont type ref to cl_gui_custom_container.
I had to:
create object editor_cont exporting container_name = 'C_TEXT'.
create object editor_obj exporting parent = editor_cont
wordwrap_mode = cl_gui_textedit=>wordwrap_at_fixed_position
wordwrap_position = 79
wordwrap_to_linebreak_mode = cl_gui_textedit=>true.
-
First answer accepted:
Ignore the above then! Thanks for the points.
‎2006 Aug 14 9:00 AM
Hi Neil,
What is the best way to save the text using STXH table with my container(txt).
thanks
kaki
‎2006 Aug 14 8:34 AM
If you are using cl_gui_textedit you can use the set_readonly_mode method:
data: editor_obj type ref to cl_gui_textedit,
editor_cont type ref to cl_gui_custom_container.
call method editor_obj->set_readonly_mode
exporting readonly_mode = cl_gui_textedit=>true.
‎2006 Aug 14 11:28 AM
while creating object of the editor
pass wordwrap_mode = 2
wordwrap_position = 70
70 is the no. of characters in a single line of editor.
now use method protect_lines.
now ur code will work.