<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: CL_GUI_TEXTEDIT limit lines in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-textedit-limit-lines/m-p/1253833#M145606</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure,  check the example program.  Notice in the constructor of the text editor control, we are forcing that the line size is 72 and that the character count is 216.  This means that you are allow 3 lines of 72 characters per line,  no more.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001 .

data:
      dockingleft  type ref to cl_gui_docking_container,
      text_editor    type ref to cl_gui_textedit,
      repid type syrepid.

data: textlines type table of tline-tdline,
      wa_text type tline-tdline.

parameters: p_check.

at selection-screen output.

  repid = sy-repid.

  create object dockingleft
              exporting repid     = repid
                        dynnr     = sy-dynnr
                        side      = dockingleft-&amp;gt;dock_at_left
                        extension = 1070.

&amp;lt;b&amp;gt;  create object text_editor
              exporting
                   WORDWRAP_MODE    = 2
                   max_number_chars = 216
                   wordwrap_position = 72
                   parent     = dockingleft.&amp;lt;/b&amp;gt;

start-of-selection.

  call method text_editor-&amp;gt;get_text_as_r3table
     importing
           table              = textlines
     exceptions
           others             = 1.

  loop at textlines into wa_text.
    write:/ wa_text.
  endloop.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RIch Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Mar 2006 18:09:16 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2006-03-21T18:09:16Z</dc:date>
    <item>
      <title>CL_GUI_TEXTEDIT limit lines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-textedit-limit-lines/m-p/1253832#M145605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to limit the quantity of lines, using cl_gui_textedit ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Alexandre Nogueira&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Mar 2006 18:00:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-textedit-limit-lines/m-p/1253832#M145605</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-21T18:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: CL_GUI_TEXTEDIT limit lines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-textedit-limit-lines/m-p/1253833#M145606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure,  check the example program.  Notice in the constructor of the text editor control, we are forcing that the line size is 72 and that the character count is 216.  This means that you are allow 3 lines of 72 characters per line,  no more.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001 .

data:
      dockingleft  type ref to cl_gui_docking_container,
      text_editor    type ref to cl_gui_textedit,
      repid type syrepid.

data: textlines type table of tline-tdline,
      wa_text type tline-tdline.

parameters: p_check.

at selection-screen output.

  repid = sy-repid.

  create object dockingleft
              exporting repid     = repid
                        dynnr     = sy-dynnr
                        side      = dockingleft-&amp;gt;dock_at_left
                        extension = 1070.

&amp;lt;b&amp;gt;  create object text_editor
              exporting
                   WORDWRAP_MODE    = 2
                   max_number_chars = 216
                   wordwrap_position = 72
                   parent     = dockingleft.&amp;lt;/b&amp;gt;

start-of-selection.

  call method text_editor-&amp;gt;get_text_as_r3table
     importing
           table              = textlines
     exceptions
           others             = 1.

  loop at textlines into wa_text.
    write:/ wa_text.
  endloop.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RIch Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Mar 2006 18:09:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-textedit-limit-lines/m-p/1253833#M145606</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-03-21T18:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: CL_GUI_TEXTEDIT limit lines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-textedit-limit-lines/m-p/1253834#M145607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, as this example, I can have 216 lines with 1 caracter. It's the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alexandre Nogueira&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Mar 2006 18:31:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-textedit-limit-lines/m-p/1253834#M145607</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-21T18:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: CL_GUI_TEXTEDIT limit lines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-textedit-limit-lines/m-p/1253835#M145608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see.   Would it be ok to check the number of lines and give an error message?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001 .

data:
      dockingleft  type ref to cl_gui_docking_container,
      text_editor    type ref to cl_gui_textedit,
      repid type syrepid.

data: textlines type table of tline-tdline,
      wa_text type tline-tdline.

data: lines type i.

parameters: p_check.

at selection-screen output.

  repid = sy-repid.

  create object dockingleft
              exporting repid     = repid
                        dynnr     = sy-dynnr
                        side      = dockingleft-&amp;gt;dock_at_left
                        extension = 1070.

  create object text_editor
              exporting
*                   wordwrap_mode    = 2
*                   max_number_chars = 216
*                   wordwrap_position = 72
                   parent     = dockingleft.

&amp;lt;b&amp;gt;at selection-screen.

  check sy-ucomm = 'ONLI'.

  call method text_editor-&amp;gt;get_text_as_r3table
     importing
           table              = textlines
     exceptions
           others             = 1.

  describe table textlines lines lines.

  if lines &amp;gt; 2.
    message e001(00) with 'The line limit is two'.
  endif.&amp;lt;/b&amp;gt;

start-of-selection.


  loop at textlines into wa_text.
    write:/ wa_text.
  endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Mar 2006 18:41:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-textedit-limit-lines/m-p/1253835#M145608</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-03-21T18:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: CL_GUI_TEXTEDIT limit lines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-textedit-limit-lines/m-p/1253836#M145609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeap, it's a good way, thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alexandre Nogueira&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Mar 2006 18:44:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-textedit-limit-lines/m-p/1253836#M145609</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-21T18:44:02Z</dc:date>
    </item>
  </channel>
</rss>

