MULTIEDIT delete the first lines

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

  • MULTIEDIT delete the first lines

    HI guys

    need some inspiration.

    Use a MULTIEDIT to show a character stream comming in.
    But when haveing to many characters in the multiedit it slows my application down, so i want to have max 200 characters in the multiedit.
    It means a FIFO routine ..adding one in the end and delete one in the beginning.
    The best way will be to delete the first line when scrolling the last line...

    how to make that in an easy way ?

    Hjalmar
  • Hi Hjalmar,

    I would recommend using the function MULTIEDIT_GetText() to get the current content.

    The function GUI__WrapGetNumBytesToNextLine() could be used to determine the number of bytes to the next line assuming the inner xSize of the MULTIEDIT widget is known. After that MULTIEDIT_SetText() should be called with a pointer to the beginning of the second line which is the result of MULTIEDIT_GetText() + the number of bytes returned by GUI__WrapGetNumBytesToNextLine().

    Scrolling operations could be detected within the parents callback function when receiving a WM_NOTIFICATION_SCROLL_CHANGED notification message.

    The function GUI__WrapGetNumBytesToNextLine() is not documented. But I think it would be a good idea to add such a function for the future.

    Regards,

    Jörg
    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.