On Tue, 4 Jun 2019 19:59:13 +0200, Mike Wey wrote:

On 04-06-2019 06:14, Alex X wrote:

What I believe is the problem is that I'm using a 3-box in a paned and the 3rd box is not allowed to reduce it's height to 0 which is what I need so it does not effect the others when the height is too small.(essentially the other boxes need to "rob" the 3rd one of it's height).

Any time I add any widget it seems to get a min height value of around 20 or 30 and will never reduce beyond that. In fact, I want the height to be infinite but visually it will never effect the height of the other boxes.

I guess I will have to some how programmatically make this work out or figure out some combination of widgets that might allow it to work?

[ Paned

[ Box 1]

[ Box 2]

[ Box 3]

]

Box 3 should have infinite virtual height but show 0 height for the other box heights.

I'm not entirely sure if i am following you.

But what happens when you set the `shrink`

child property of the Box to

true?

```
paned.childSetProperty(box, "shrink", new Value(true));
```

Unfortunately it does not work ;/

With a paned it crashes, if I use the parent box it does not crash but seems to have no effect. Does every child of of the one I want to shrink need to have the property set?

I simply have a gtkBox, 3 rows. The first row is fixed in size, the second row's size should vary from 0 to 100 depending on how much space. Last last row should take up any remaining space.

the gtkBox can grow in size over all set by the user.

It's sort of like a drop down box.

It fact, it really has nothing to do with a paned, I suppose. That is a top level container that lets me size the boxes.

It's simply that I have a 3-Box and the 3rd row should shrink down to 0 before the two top boxes are shrunk.

It's also can be thought of as a 2-box.

[[[Row 1]]]

[[[Row 2]]]

Row 1's height can vary. Row 2's height can vary. The overall box containing these will change based on the outside. It's height is H.

The height is split up between row 1 and row 2.

Min max of row 1 is 0 and 100, min max of row 2 is 0 and infinity(or screen height)

I always want row 1 to dominant row 2. If H <= 100 then row 1 is only shown and row 2 is completely hidden. If H > 100, say, 110 then row 2's height is 10, if H = 300 then row 2's height is 300-100 = 200.

If H = 30, row 1's height is 30, row 2's height is 0.

the formulas would be

row1Height = min(100, max(0, H))

row2Height = max(0, H - row1Height)

e.g., if H = 200 then

row1Height = min(100, max(0, 200)) = 100

row2Height = max(0, H - row1Height) = 100

And they are split evenly,

but if H = 100, then

row1Height = min(100, max(0, H)) = 100

row2Height = max(0, H - row1Height) = 0

But what is happening is that when H <= 100, the height is split evenly, which I don't want.

I end up with

row1Height = 50

row2Height = 50

and row1height + row2Height = H.

That is the default algorithm, I suppose, equally distributing the height among the children but it is not what I want. I'm not sure how to get it to work.