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

CL_GUI_TEXTEDIT stops responding

Former Member
0 Likes
1,136

I have a screen with 2 customer containers. The top one is an ALV grid that lists documents in a certain folder. The bottom one is a TextEdit box. Once the user double clicks a row of the ALV grid, the file is uploaded and is displayed in the TextEdit box.

This works fine, however, I have a button under the two boxes. When pressed all it does is clear the TextEdit box, using the delete_text() method. When I click the button, the texts gets cleared fine, but then the double clicking of the ALV functionality doesn't work anymore.

I've debugged the code and it hits the double_click event code, uploads the file like normal, but it doesn't display on the TextEdit box anymore. Is there something about a TextEdit box that makes it stop working after you run through the PAI methods? If you need to see code, let me know what part. I've looked and I can't find anything. Any help would be greatly appreciated.

Thanks,

Curtis

I have a screen with 2 customer containers. The top one is an ALV grid that lists documents in a certain folder. The bottom one is a TextEdit box. Once the user double clicks a row of the ALV grid, the file is uploaded and is displayed in the TextEdit box.

This works fine, however, I have a button under the two boxes. When pressed all it does is clear the TextEdit box, using the delete_text() method. When I click the button, the texts gets cleared fine, but then the double clicking of the ALV functionality doesn't work anymore.

I've debugged the code and it hits the double_click event code, uploads the file like normal, but it doesn't display on the TextEdit box anymore. Is there something about a TextEdit box that makes it stop working after you run through the PAI methods? If you need to see code, let me know what part. I've looked and I can't find anything. Any help would be greatly appreciated.

Thanks,

Curtis

5 REPLIES 5
Read only

Kartik2
Contributor
0 Likes
1,098

hi,

you can try doing CL_GUI_FLUSH=>FLUSH at every clear. I mean at the button click where you are clearing the textedit.

Regards,

kartik

Read only

Former Member
0 Likes
1,098

Kartik,

I tried adding a flush at the end and it didn't work. Thanks for the suggestion though.

Thanks,

Curtis

Read only

Former Member
0 Likes
1,098

Hi,

In the double_click event, first free the editor using CALL METHOD editor->free.

Then again create object for editor and generate editor with new text.

CREATE OBJECT editor

EXPORTING

wordwrap_mode = cl_gui_textedit=>wordwrap_at_fixed_position

wordwrap_position = 110

wordwrap_to_linebreak_mode = cl_gui_textedit=>true

parent = container

CALL METHOD editor->set_textstream

EXPORTING

text = g_text.

Read only

0 Likes
1,098

That does free the object and creates a new one, however, when I try to put text back in there, nothing shows up.

I'm using

call method o_ta->set_text_as_r3table
    exporting table = t_file[].

to populate the textedit box. The variable t_file has the correct data. It works fine up until I hit the "button" and go through the PAI module. Then it stops working.

Read only

0 Likes
1,098

I fixed it. Along with "free"ing the textedit box using the FREE method, I also had to free and recreate the custom container as well. Also, the code went in the PAI module after doing the clear instead of the double click event.

Thank you all for you help.

Curtis