Hi Jan!
The #setAutomaticRelayout method is made to relayout the composite shape, as you have
rightfully guessed. You were using labels, and it was buggy actually. Update Roassal and
Trachel and the following example should illustrate what you are trying to obtain.
-=-=-=-=-=-=-=-=-=-=-=-=
s := RTCompositeShape new.
b1 := RTBox new color: Color green.
b2 := RTBox new color: Color blue; size: 20.
b3 := RTLabel new.
s add: b1.
s add: b2.
s add: b3.
s horizontal.
s setAutomaticRelayout.
e := s elementOn: 'click to expand'.
view := RTView new.
view add: e.
e @ RTDraggable.
e @ RTPopup.
e when: TRMouseClick do: [ :ev |
e trachelShape shapes second extent: 45 @ 45.
e trachelShape shapes third text: 'hello'.
view signalUpdate.
].
view open
-=-=-=-=-=-=-=-=-=-=-=-=
Keep doing!
Alexandre
On Mar 24, 2015, at 5:30 AM, Jan B.
<bliznjan(a)fit.cvut.cz> wrote:
(compo := RTCompositeShape new)
add:
(RTLabel new
text: 'a string';
color: Color red);
add:
(RTEllipse new
size: 20;
color: Color blue);
horizontal;
setAutomaticRelayout. "just tried what it will do"
elem := compo element.
(v := RTView new)
add: elem;
open.
elem trachelShape shapes first text: 'quite longer string'.
v
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.