Inquiries about slides

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

    • Inquiries about slides

      I want to apply a design consisting of 3 pages.

      I want to apply the transition on each page in a slide manner.

      I attached a picture as an example of a design example.

      When referring to MOTION_OverlapByWindow among the example files in emwin, I am not sure how to configure each button for each page.

      When you create and slide a button in the MOTION_OverlapByWindow example file as a test, the button remains in the same position without moving.

      When each page has a different configuration, is it right to create each page with a window?

      Is there an example code to refer to when doing this design?

      Please reply.
      Images
      • ex.png

        25.15 kB, 1,323×284, viewed 317 times
    • Hi,

      please excuse the late reply.

      The example MOTION_OverlapByWindow.c you refered to might not be the best template for what you are trying to do. In this example, the main window is the size of the display and WM_MOTION is used to collect the moved distance. So the main window is not moved at all, and so its child windows (e.g. a button) are not moved either. You would have to manually move the child windows based on the motion offset (similarly as the pages are drawn in WM_PAINT based on the motion position).

      In your case it would make more sense to create a main window that is bigger than the display, given on how many pages you want. For example, if your screen is 480x272 pixels and you want four pages that are moved horizontally, your window would have a width of 480*4=1920px.

      Please have a look at this example in the emWin wiki where this is done. Because the whole window is moved, child windows will be moved automatically along with their parent.

      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.