Hi Peter,
Thanks for your prompt answer. Yes, I meant width :)
How can I retrieve the label (RTLabelled) from an element object (RTElement)? I don’t have a reference to the label (as in the example) but only to the element.
Leonel Merino merino@iam.unibe.ch
On 03 Sep 2015, at 15:43, Peter Uhnák i.uhnak@gmail.com wrote:
What do you mean by "the size of the label"? It's width?
|v el lbl| v := RTView new. el := RTEllipse new size: 5; elementOn: 'number'. v add: el. (lbl := RTLabelled new) fontSize: 30. el @ lbl. el @ (RTPopup new text: [:e | lbl lbl width asString]). v
Or you can be exlicit and add RTLabel as a new shape, but then you would have to manually setup the interaction.
Peter
On Thu, Sep 3, 2015 at 2:57 PM, Leonel Merino <merino@iam.unibe.ch mailto:merino@iam.unibe.ch> wrote: Hi all,
In the example below. How can I print the size of the label instead of the circle’s size?
v := RTView new. el := RTEllipse new size: 5; elementOn:'number'. v add: el. el @ (RTLabelled new fontSize:30). el @ (RTPopup new textElement:[:e| e width asString]). v
<PastedGraphic-5.png>
Best regards
Leonel Merino merino@iam.unibe.ch mailto:merino@iam.unibe.ch
Moose-dev mailing list Moose-dev@iam.unibe.ch mailto:Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev 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