multi formated text in one widget

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

    • multi formated text in one widget

      Hello,

      I wanted to design the screen similar to attached image.

      The <title> in the image is in one color and the <title text> is in another color. The title text may need more than one line. The same is applicable for description as well.

      The <description> may need more than one screen to fit the <description text>. So, the screen scrolling should be adjusted using up and down arrow .

      The title <text text> is not static/fixed, the text length may vary and accordingly the <description text> should be adjusted automatically.

      I have some questions:

      1. Is it possible to show the multicolor text using one widget? If yes, which widget has this feature? If not, is there any alternative way to fit this requirement?
      2. Is it possible to add bitmap image over the scrollbar arrow?


      Thanks,
      Vikram
      Images
      • Screen.png

        26.21 kB, 546×273, viewed 926 times
    • Hi,

      title and description with different colors/fonts in one line won't be easy to achieve. I'm not saying it is impossible, but it will be a lot of fiddling. So you might want to change your design, like the title could be placed above the text, so that it isn't embedded in the text block.

      Changing the appearance of a scrollbar to what you want is not possible. Instead, you could create two buttons and overwrite their callback, so that they display the up and down arrow from your image.

      Instead of using buttons you may also use motion scrolling, which enables you to scroll the text like you would on a smartphone (see attached sample). If the arrow buttons should scroll your text, you can take the motion scrolling sample as reference. The arrow buttons would add or subtract a scroll offset.

      If you have any more questions, please let me know.

      Best regards,

      Florian
      Files
      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.
    • Thanks for your reply.

      I have one more question that, Is it possible to adjust the spacing between the paragraphs?

      Similar to different colors/fonts complexity, Is the same complexity applicable for bold/Italic properties as well?

      As you suggested, if I changed the design then shall I choose Text widget to design the above requirement?

      If any widget better than Text widget then please let me know.


      Thanks,
      Vikram

      The post was edited 1 time, last by vikramtathe ().

    • Hi,

      vikramtathe wrote:

      I have one more question that, Is it possible to adjust the spacing between the paragraphs?
      yes, since you are going to display strings in rectangles (GUI_RECT), you can define the position of the rectangles and thus the spacing between the paragraphs.

      vikramtathe wrote:

      Similar to different colors/fonts complexity, Is the same complexity applicable for bold/Italic properties as well?
      Yes, this applies to all kinds of text properties.

      vikramtathe wrote:

      As you suggested, if I changed the design then shall I choose Text widget to design the above requirement?
      You can try out for yourself which method you prefer, doing it by yourself by displaying the string in a rectangle or by creating TEXT widgets. Using TEXT widgets is easier than the rectangle method.

      Best regards,

      Florian
      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.
    • Thank you.

      I am have started designing the above requirement attached in the first post using Multi line text widget(MULTIEDIT). Please correct me if I have selected the wrong widget.

      Performance wise any better widget available than MULTIEDIT widget, Please let me know.


      If any sample example available using multiedit or text widget, could you please share it?


      Thanks,
      Vikram
    • Hi,

      the performance when using MULTIEDIT widgets will be much better compared to using motion support.

      I have attached a sample for MULTIEDIT widgets, I hope this helps.

      Best regards,

      Florian
      Files
      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.
    • Thank you for your reply.

      I have some more doubts on Multiedit text widget.

      1. Is it possible to justify the text added in the widget?
      2. How to control the scrolling events by buttons?
      3. How do I come to know the scrolling is ended or this is the first page? (the requirement is to change the button color if there is no more scrolling).


      Thanks,
      Vikram

      The post was edited 1 time, last by vikramtathe ().

    • Hi,

      to answer your first question: you can set the text alignment using MULTIEDIT_SetTextAlign().

      I have attached a sample for you that controls the scrolling with buttons. This should answer your two other questions.

      If you have any questions about the sample, please let me know.

      Best regards,

      Florian
      Files
      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.