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

Text area not editable

Former Member
0 Likes
1,710

How can I do not editable a text area created with cl_gui_textedit?

Is it posible?

I just want insert text inside the program.

1 ACCEPTED SOLUTION
Read only

naimesh_patel
Active Contributor
0 Likes
979

Use method SET_READONLY_MODE.


* for change mode
    CALL METHOD v_cl_fetitletextedit->set_readonly_mode
      EXPORTING
        readonly_mode = 0.

Regards,

Naimesh Patel

3 REPLIES 3
Read only

naimesh_patel
Active Contributor
0 Likes
980

Use method SET_READONLY_MODE.


* for change mode
    CALL METHOD v_cl_fetitletextedit->set_readonly_mode
      EXPORTING
        readonly_mode = 0.

Regards,

Naimesh Patel

Read only

RaymondGiuseppi
Active Contributor
0 Likes
979

Yes, look at [SAP Textedit|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCITEXTEDIT/BCCITEXTEDIT.pdf] for PROTECT_LINES method.

call method textedit->protect_lines
  exporting
    from_line = from_line
    to_line = to_line
    protect_mode = protect_mode 
    enable_editing_protected_text = enable_editing_protected_text
  exceptions
    error_cntl_call_method = 1
    invalid_parameter = 2.

Regards

Read only

rajendra_sv
Advisor
Advisor
0 Likes
979

Hello,

In case if you want the whole textedit to be noneditable use method

SET_READONLY_MODE with parameter true to make read only mode and false to input mode.

In case if you want only some area or lines to be not editable use methods

PROTECT_LINES or PROTECT_SELECTION.

For more details on method see

http://help.sap.com/saphelp_nw70/helpdata/EN/f1/549e36cf0ecb7de10000009b38f889/frameset.htm

you can also go through the demo programs

SAPTEXTEDIT_TEST_2

Best Regards

Rajendra