Sticky header in resizable dynamic panel


#1

Hello everyone!
I would like to have some help with my work.
I made a popup window which can be resized and there is scroll option inside the popup . the problem is that i cant understand how to make the header stick to the upper side of the popup, both when scrolling and resizing, i managed to get only one option work at a time…

thanks for the help!

nitai.


#2

If your “popup window” is a dynamic panel (I’ll call “popup dp”) it is best if your “sticky header” is separate from that popup dp. Then it will not scroll/move when popup dp is scrolled.

To support resizing, you can use the Resized event of the popup dp to size and move your header, e.g.,

Resized
Set Size MyHeader to ([[This.width]] , )
Move
MyHeader to ( [[This.left]], [[This.top - Target.height]] )

  • Where in the Set Size action the height value is blank, so the height of the header does not change.
    • Alternatively, you could also resize the header height if you need, based on some “breakpoint” widths, or as a percentage of the popup dp height, (e.g., [[This.height * 0.2]] ).