Get autosized dialog_group size

I got R - autosized dialog_group with “Car catalog”. I want to get R height and send it to R1. I tried get(), but i think it doesn’t work while D is not open.

new(D, dialog),
new(R, dialog_group('Cars', box)),
    create_car_cards(R, Cars, Login),
    new(R1, dialog_group('Profile', box)),
    send(R1, append, button('Purchases')),
    send(R1, append, button('Exit',
                             message(D, destroy)), below),
    send(D, append, R),
    get(R, size, size(_, H)), %here
    send(R1, heigth, H), %
    send(D, append, R1, right),
    send(D, open).

Jan would say: “XPCE is old school”

1 Like

If you want to manually tweak the layout, you must do so after the automatic layout. Its long ago … You can do that after the ->open and I recall something called a ->compute method on dialog objects that forces computing the layout.

It worked

 send(D, open),
  get(R, height, H),
  send(R1, height, H-8),
  send(D, compute).