Login  Register

Roassal: Locate a legend text below a line

Posted by hernanmd on Feb 20, 2017; 4:47am
URL: https://forum.world.st/Roassal-Locate-a-legend-text-below-a-line-tp4934979.html

Hi everybody,

I have this complicated code to draw a line with separators at both ends, I try to put the legend text with #below but nothing is changed :

| view e1 e2 l1 label |

view := RTView new.

label := RTLabeled new
    color: Color black;
    below;
    text: 'Class IIa';
    yourself.

e1 := RTBox new element
    color: Color black;
    height: 10;
    width: 1;
    yourself.
e2 := RTBox new element
    color: Color black;
    height: 10;
    width: 1;
    yourself.
   
l1 := RTStyledMultiLine new
    color: Color black;
    solidLine;
    edgeFrom: e1 to: e2.

view addAll: (Array with: e1 with: e2 with: l1).
l1 @ label.

RTHorizontalLineLayout new on: view elements.
view elements pairsDo: [ :a :b | b translateBy: 100 @ 0 ].
^ view

Any suggestion?

Hernán


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev