Is it possible to take a component "out of the flow" in a container with Vertical or Horizontal Layout?

Dave shared this question 4 years ago
Answered

That is, is it possible to cause one or more components (widgets or groups) to behave as though they were in a container with Free Layout, so that they do not affect the positioning of other components, which are subject to the behavior of the Vertical Layout container when the "Free" components are shown or hidden?

Comments (2)

photo
1

Other than the obvious of not placing those components inside the container, right? Why do you need them inside if they're not going to be affected by the layout?

photo
1

Other than the obvious, right: I have a number of components that I want to "float" over (and extend beyond the boundaries of) their apparent "parent" containers (i.e., the following image), but this is slightly different.


In answer to your question as to why I need them, imagine a list like the above image, but with the ability to move items up and down the list by clicking ▲ and ▼ buttons in the UI. To indicate where the current item will go when ▲ is clicked, I want to display an "insertion bar" above the previous item without causing the items below the "insertion bar" to be displaced by the height of the bar:


>===============================================<


+-----------------------------------------------+


| ▲ Item one |


| ▼ |


+-----------------------------------------------+


>===============================================<


+-----------------------------------------------+


| ▲ Item two |


| ▼ |


+-----------------------------------------------+


>===============================================<


+-----------------------------------------------+


| ▲ Item three |


| ▼ |


+-----------------------------------------------+


>===============================================<


+-----------------------------------------------+


| ▲ Item four |


| ▼ |


+-----------------------------------------------+


>===============================================<


By default, the insertion bars >====/~/====< are hidden. When the user hovers over the ▲ of Item two, then the first insertion bar appears. If the insertion bar is "in the flow," then all of the items are pushed down by its height, which has the effect of moving the mouse off the ▲, which hides the insertion bar, which causes everything to pop back up again, and so forth.


Because the items are in a scrolling dynamic panel, and because their height may vary based on data or interactions (for example, clicking a "more ..." link to expand their contents), I cant (well, haven't figured out how to) position the insertion bars so that they will appear exactly where they might need to be under changing circumstances of content size and scrolling. (See related request: Feature request: Move objects (shapes/widgets or components) by calculation).


What I imagined is a flag that allows a component (such as the insertion bars) to be affected by the flow of elements before it (moving down as earlier items expand, scrolling with the other elements), but having effectively zero height, so that their appearance/disappearance does not move other items in the flow.


I'm asking for the moon, I know.