‎2008 Jun 12 6:17 AM
Below is my code which I am displaying my text in text editor first time it is displaying and it is not clearing the first displayed text and also others values also not displaying please help me
CLEAR: wa_result.
CLEAR: w_container1, w_text_editor.
REFRESH it_texttab.
READ TABLE it_result INTO wa_result INDEX p_e_row_id.
SELECT * FROM zemp_dailyact_t
INTO TABLE it_zemp_dailyact_t WHERE empid = wa_result-empid
AND objid = wa_result-objid.
CLEAR wa_zemp_dailyact_t.
LOOP AT it_zemp_dailyact_t INTO wa_zemp_dailyact_t.
wa_texttab-line = wa_zemp_dailyact_t-rmrk_text.
APPEND wa_texttab TO it_texttab.
CLEAR : wa_texttab, wa_zemp_dailyact_t.
ENDLOOP.
CALL SCREEN 200.
CALL METHOD w_text_editor->DELETE_TEXT( ).
ENDFORM. " navigate_to_detail_view
&----
*& Module STATUS_0200 OUTPUT
&----
text
----
MODULE status_0200 OUTPUT.
SET PF-STATUS 'GUI200'.
SET TITLEBAR 'T02'.
CLEAR: w_container1, w_text_editor.
CHECK w_container1 IS NOT BOUND.
CREATE OBJECT w_container1 EXPORTING container_name = 'TEXT_EDITOR'.
CREATE OBJECT w_text_editor EXPORTING parent = w_container1
wordwrap_mode = cl_gui_textedit=>wordwrap_at_windowborder.
***to put some text in the text editor.
CALL METHOD w_text_editor->set_text_as_r3table
EXPORTING
table = it_texttab " Contents of this table is displayed in text editor
EXCEPTIONS
error_dp = 1
error_dp_create = 2
OTHERS = 3.
IF sy-subrc EQ 0.
ENDIF.
CALL METHOD w_text_editor->set_readonly_mode( ).
ENDMODULE. " STATUS_0200 OUTPUT
‎2008 Jun 12 6:24 AM
hi ,
after set_text , use this two methods
CALL METHOD g_editor->set_first_visible_line .
CALL METHOD c_textedit_control=>flush.
Just try it out it may work.
regards
Raj
‎2008 Jun 12 6:24 AM
hi ,
after set_text , use this two methods
CALL METHOD g_editor->set_first_visible_line .
CALL METHOD c_textedit_control=>flush.
Just try it out it may work.
regards
Raj
‎2008 Jun 12 6:31 AM
‎2008 Jun 12 6:36 AM
Hi,
Change this piece of code with the below code.....
CHECK w_container1 IS NOT BOUND.
CREATE OBJECT w_container1 EXPORTING container_name = 'TEXT_EDITOR'.
CREATE OBJECT w_text_editor EXPORTING parent = w_container1
wordwrap_mode = cl_gui_textedit=>wordwrap_at_windowborder.IF w_container1 IS NOT BOUND.
CREATE OBJECT w_container1 EXPORTING container_name = 'TEXT_EDITOR'.
CREATE OBJECT w_text_editor EXPORTING parent = w_container1
wordwrap_mode = cl_gui_textedit=>wordwrap_at_windowborder.
ENDIF.Cheers,
Jose