Hi all,
I am trying to place a label besides nodes (and make them stick at their place when dragging them around). Then I saw the ongoing discussion related to RoTranslatingShape, which seems is exactly what I would need. I looked at all the examples and the discussion, but am not able to make it work correctly.
What I would want is to create some node, then have a label right at its bottom left side (or top left, or bottom right). The node is not resizable (and its contents, or children, do not change), so that should not be a problem.
The difference to the other examples is probably that I already have a node in the view, and then I try to attach the label afterwards.
So I have something like this:
testNodeLabeling
| view rawView nodes node label |
rawView := ROView new.
view := ROMondrianViewBuilder view: rawView.
view shape rectangle size: 100.
nodes := view nodes: (Array with: 1).
node := nodes at: 1.
node translateTo: 20@20.
label := (ROElement on: 'test') + (ROTranslatingShape new offset: 0 @ 20 negated) + ROLabel.
rawView add: label.
view noLayout.
view open.
How would I now 'attach' this label to the node?
Or is this the wrong way to go on about this?
Cheers,
Dennis