Hi Leo,I understand your email. As Doru has been saying, we need a way to specify where the nested elements should go when composing shapes. Currently I have unfortunately no solution.The approach you can do right now, is the one taken by all the GUI framework that I know: encapsulate the label and the container with its nested element. Here is an example that you can get inspiration from:-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=| classes allClassElements v es enclosing label g1 back |
classes := RTShape withAllSubclasses.
allClassElements := OrderedCollection new.
v := RTView new.
classes do: [ :cls |
es := RTBox elementsOn: cls methods.
es @ RTPopup.
back := (RTBox new color: Color blue) element.
RTNest new
layout: RTGridLayout new;
on: back nest: es.
enclosing := (RTBox new color: Color transparent) element.
label := (RTLabel new text: #name) elementOn: cls.
g1 := RTGroup withAll: { label . back }.
RTNest new
layout: RTVerticalLineLayout new alignCenter;
on: enclosing nest: g1.
enclosing @ RTDraggable.
v add: enclosing.
v add: back.
v addAll: es.
v add: label.
allClassElements add: enclosing.
].
RTFlowLayout on: allClassElements.
v-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=Cheers,Alexandre--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._______________________________________________Hi,
using Roassal2 I would like to get a box with some nested element on it and the box get a label above itself.
I tried this but it is not working
view := RTView new.
container := (RTVerticalCompositeShape new
shape1: RTLabel new;
shape2: (RTBox new color: (Color blue alpha: 0.5)))
elementOn: 'Container'.
els := RTEllipse new elementsOn: (1 to: 16).
view add: container; addAll: els.
RTNest new layout: RTGridLayout; on: container nest: els.
view @ RTDraggableView.
view open
As you can see the label is not move due to the resize of the box with the nest.
I do not use TRConstraint because I will have several boxes and if I apply a layout on them the label is not calculate in the size so I do not think this is a solution but RTNest on RTVerticalCompositeShape is.
--
Cheers,
Leo Perard
University of Lille 1
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev