Using multiple CollapsiblePanel with automatic positioning

2 posts, 0 answers
  1. HMPSOLBB
    HMPSOLBB avatar
    15 posts
    Member since:
    Mar 2012

    Posted 24 Jun 2014 Link to this post

    Hi,

    I want to use multiple CollapsiblePanel on a form, all of them are loaded collapsed. The ExpandDirection is "down". If I open the first one I want to second (and also the others) to move down, starting below the first CollapsiblePanel. What is the best way to do this? Either witch CollapsiblePanel is open, the folowing have to start below of opened one.

    Thanks!

    Oliver
  2. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 26 Jun 2014 Link to this post

    Hello Oliver,

    Thank you for writing.

    To do that, once you expand the first panel, you need to check its size and according to its new size, set the Location of the rest of the panels i.e if you have three panels, all collapsed with height 40 px. The first is located at 0,40, the second at 0,80, the third at 0,120. Once you expand the first, check its size (let's say 140), deduct the initial panel size (140 - 40) and add the difference to the Y location of the other panels i.e. second panel location should be 0,140 and third panel location should be 0,180.

    I hope that you find this information useful.

    Regards,
    Stefan
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top