Application Development 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: 

CL_GUI_RTF_EDITOR

ingolf_dresp3
Explorer
0 Kudos

Dear all,

I am completely lost on how to determine the number of lines entered in a CL_GUI_RTF_EDITOR control.

The class CL_GUI_RTF_EDITOR provides the method IS_LINE_BEGIN, but this only works for hard line breaks - those created by pressing ENTER.

Line breaks that appear by writing a very long line that goes over the right window end are not counted.

Otherwise there is no suitable method.

A clue might be to use the method get_property, but I don't know the correct property.

Any help is really appreciated!!

Best regards from Switzerland,

Ingolf Dresp

1 ACCEPTED SOLUTION

former_member181962
Active Contributor
0 Kudos

Use the get_text method.

YOu can find the number of lines of the returned table using describe statement.

call method <get text>

.

..

.

describe table itab lines v_lines.

4 REPLIES 4

former_member181962
Active Contributor
0 Kudos

Use the get_text method.

YOu can find the number of lines of the returned table using describe statement.

call method <get text>

.

..

.

describe table itab lines v_lines.

0 Kudos

Dear Ravi,

could you please also supply the type of the table itab, because if I use

itab type tlinetab

then the number of lines in itab does not correspond with the number of lines in the control.

Regards and THX for trying!!

Ingolf

0 Kudos

Hi Ingolf,

YOu can use the method GET_WIDTH to find the width of the editor, there by you can create an internal table of that length.

Regards,

Ravi

0 Kudos

I know this a pretty old topic, but i need help. Can you guys provide sample code? I'm have the container and the object and trying to call set_text method passing the rtf_text, yet not seeing anything in the output. I want to know a complete example that works.

Thanks in advance,

Siva