StretchableLayoutManager hiding component


#1

i’ve a component with a couple of views, organized through the StretchableLayoutManager and DividerBar. if i do something like this:

layout.setItemLayout (0, -0.000, -1.000, -0.800); layout.setItemLayout (1, 3, 3, 3); layout.setItemLayout (2, -0.000, -1.000, -0.200);

and then in resized() i layoutComponents () all is working perfectly. the fact is that these views components could be resized to have the complete bounds of the window, keeping only the resizer visible. but if i drag the resizer bar to completely hide one of the two components (and have the other one fill the whole window) and try to move the resizer bar to make both components visible again, it seems that the component that i have made hidden now takes bounds with height (or width) = 0, and is not shown anymore.
for making it work i have to assign sensible minimum size (actually at least 10 pixels or -0.1 in percentage) to the layout manager, the only thing is that the user could completely hide some components he not need, and maybe show them afterwards, without the limitation of having all of them visible in minimum part on the window…


#2

Ok, that’s interesting. Probably just a maths error somewhere. I’ll check it out when I get a moment.


#3

gr8 :wink: just to notice things when dealing with complete applications behaviour…


#4

hi,

that’s exactly the post i was looking for :wink:
Is there yet a solution to hide components of a stretchableLayoutManager ?

thanks a lot for your quick support


#5

anyway that has not been fixed in new versions of juce. probably i’ll step into the code and see what is happening by myself :slight_smile:


#6

I assume this wasn’t solved yet, right?


#7