PtDivider parent re-sizing question

I have a PtPane (say P1) which contains a PtDivider (vertical orientation)
which itself contains two PtPanes (call them PTop and PBottom).

When P1 is re-sized (vertical size), what I want to happen is for PBottom to
remain the same size, and PTop to shrink/grow to fit. But what actually
happens is that PTop stays the same size and PBottom shrinks/grows.

How do I make this work the way I want? I was expecting it would be some
magic combination of Anchor options and PtDivider flags… but I just can’t
seem to make it work. Or do I actually have to resort to doing something
manually via a callback on the P1 re-size?

Note that I do still want to be able to re-size PTop/PBottom by grabbing the
divider.

Rob Rutherford
Ruzz Technology

Robert Rutherford <ruzz@nospamplease.ruzz.com> wrote:

I have a PtPane (say P1) which contains a PtDivider (vertical orientation)
which itself contains two PtPanes (call them PTop and PBottom).

When P1 is re-sized (vertical size), what I want to happen is for PBottom to
remain the same size, and PTop to shrink/grow to fit. But what actually
happens is that PTop stays the same size and PBottom shrinks/grows.

I take it you have anchored the divider to its parent (P1). Good.

How do I make this work the way I want? I was expecting it would be some
magic combination of Anchor options and PtDivider flags… but I just can’t
seem to make it work. Or do I actually have to resort to doing something
manually via a callback on the P1 re-size?

You just need to anchor PTop the same way as you anchored the divider.
This way, any time the divider grows or shrinks, the anchors make PTop
grow or shrink by the same amount, and PBottom doesn’t need to resize.

Note that I do still want to be able to re-size PTop/PBottom by grabbing the
divider.

You will be.


Wojtek Lerch QNX Software Systems Ltd.

Doh! I knew it was easy.

Thanks Wojtek

“Wojtek Lerch” <wojtek_l@yahoo.ca> wrote in message
news:anial1$jbl$1@nntp.qnx.com

Robert Rutherford <> ruzz@nospamplease.ruzz.com> > wrote:
I have a PtPane (say P1) which contains a PtDivider (vertical
orientation)
which itself contains two PtPanes (call them PTop and PBottom).

When P1 is re-sized (vertical size), what I want to happen is for
PBottom to
remain the same size, and PTop to shrink/grow to fit. But what actually
happens is that PTop stays the same size and PBottom shrinks/grows.

I take it you have anchored the divider to its parent (P1). Good.

How do I make this work the way I want? I was expecting it would be some
magic combination of Anchor options and PtDivider flags… but I just
can’t
seem to make it work. Or do I actually have to resort to doing something
manually via a callback on the P1 re-size?

You just need to anchor PTop the same way as you anchored the divider.
This way, any time the divider grows or shrinks, the anchors make PTop
grow or shrink by the same amount, and PBottom doesn’t need to resize.

Note that I do still want to be able to re-size PTop/PBottom by grabbing
the
divider.

You will be.


Wojtek Lerch QNX Software Systems Ltd.