MULTIEDIT get line count

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • MULTIEDIT get line count

      Hi,

      Is there a way to get the complete amount of lines from a multiedit widget (even if there are more lines than the multiedit can display on one page)? My first thought was that I set the cursor at the end of the text and then get the line number with MULTIEDIT_GetCursorCharPos() because the corresponding MULTIEDIT_SetCursorCharPos() function accepts the line number as well. Unfortunately MULTIEDIT_GetCursorCharPos() does not return the line number.

      Hope anyone can help me.

      regards Thomas
    • Hi,

      Unfortunately, there is no such function for the MULTIEDIT widget.

      But you can use the function below:

      GUI_WrapGetNumLines(pText, xSize, WrapMode);

      Pass this function the text to be displayed in the MULTIEDIT, the xSize of the area the text gets displayed and the wrap mode.
      Also, you should set the same font as using for the MULTIEDIT widget before calling this function.

      Regards,
      Sven
      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.