2012 Feb 06 3:42 PM
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
2012 Feb 07 6:08 AM
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
2012 Feb 07 2:34 PM
Kartik,
I tried adding a flush at the end and it didn't work. Thanks for the suggestion though.
Thanks,
Curtis
2012 Feb 08 9:44 AM
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.
2012 Feb 08 3:25 PM
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.
2012 Feb 08 4:14 PM
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
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |