Partially show child window with scrolling function

  • Hi all,

    I'm trying to setup a vertical scrolling child window inside its parent window.
    This child window Y dimension should be greater than the parent window so it will be partially visible according the current scrolling position.
    The child window contains BUTTON and TEXT objects that have to move according to the current scrolling position

    At the moment I've managed to create a small child window with an own button and the code looks like that:


    The child window has its own callback and so its own button, the visualization and the touch response is fine.

    So my questions are:
    - If I make a larger (in terms of Y-axis) child window how can I make it only partially according to the current Y-scrolling?
    - How can I make the child window scroll only on the Y-axis without moving all the window? Where do I have to write the WM_MOTION case? In both parent and child window?

    (And also if I made some mistake and this is not the proper way to do the trick...)

    Thank you!
    Mark

  • Hello,

    an unusual way, but clearly effective if you want to scroll a child dialog with a swipe. I'd make a swipelist in a main dialog, then add an empty item and attach a child dialog to that item. Otherwise you will have to create an additional window, then attach a child dialog to it and transmit motion messages to it whereas the swipelist already has the necessary functionality.

    Regards,

    Anthony

    Edited 2 times, last by cilmagemlu (July 17, 2023 at 12:25 PM).

  • Hello,

    an unusual way, but clearly effective if you want to scroll a child dialog with a swipe. I'd make a swipelist in a main dialog, then add an empty item and attach a child dialog to that item. Otherwise you will have to create an additional window, then attach a child dialog to it and transmit motion messages to it whereas the swipelist already has the necessary functionality.

    Hello Anthony,

    thank you for your answer.

    It looks like a good idea, I've struggled a little with the SWIPELIST_ItemAttachWindow function that was not working properly due to wrong object dimension (couldn't attach the window because it was too large) but I managed to make it work after fixing it!
    Thank you!

    Best regards,
    Mark

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!