This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

issue with transition of screens using grlib widgets

Hello,

I have developed a HMI with a 10" LCD panel. The driver for the LCD controller is working without hitch.

I have developed three screens which transition based on key pressed by the user. Each screen consists of a widget tree starting at WIDGET_ROOT. Widgets such as list boxes, sliders and buttons are added to the tree using WidgetAdd() function.The initial screen is shown on power on reset. when the user presses a key, the next screen is shown. When user presses another key the initial screen is expected. However, the initial screen and the current screen mix up and the screen does not show a complete screen. The transition from one screen to another is achieved by clearing the original WIDGET_ROOT using WidgetRemove() function and adding another widget tree. I believe if I remove the WIDGET_ROOT all the child widgets are also removed.

I have studied the grlib_demo in which canvas widgets are used. However, since I started off with the method I have used I have not used canvas in my code. Or is using canvas the only solution to the issue.

Thanks for your time.

Regards,

Hemant

  • Hemant Kamat1 said:
    when the user presses a key, the next screen is shown. When user presses another key the initial screen is expected. However, the initial screen and the current screen mix

    Pardon - like you - we do not use vendor's (full) graphic lib (we have our own) but I suspect you'll get better (and faster) results w/added clarification.

    Unclear is your ability to transition from one (non-initial) screen to another (non-initial) screen.  (at least that's my question for you)   You write, "when user presses a key - next screen is shown."   That's interpreted as a good (predicted) result - is that correct?

    But then you write, "when user presses another key - initial screen is expected."   (to me - that's unclear)   Are you saying that initial screen is (always) to appear after the successful appearance of any "non-initial" screen?   Or - must an, "initial screen key" be pressed?   Suspect your clarification here will assist...

    You go on to note that "initial and current screens "mix" - which is undesired."  But unclear is the "mix" of two, "non-initial" screens!   Does that occur?

    My sense is that others here - more skilled in vendor's graphic lib than moi - may benefit from your further detail.   (as identified, here)

    Good luck...