How can I change a text that appears whe you hover over edge in Roasal? I have not found this anywhere on the web
Asked
Active
Viewed 97 times
2 Answers
1
You can add a popup (with custom styling) to a single edge in the following way:
popup := ROPopup text: 'some text'.
popup textColor: Color black.
popup box color: (Color r: 0.9 g: 0.9 b: 0.9); borderWidth: 1; borderColor: (Color r: 0.8 g: 0.8 b: 0.8).
aROEdge @ popup.

dschenk
- 315
- 2
- 13
1
A complete example of it could be:
view := ROView new.
el1 := ROBox green element extent: 50 @ 50.
el2 := ROBox blue element extent: 50 @ 50.
el1 @ RODraggable.
el2 @ RODraggable.
el2 translateTo: 50 @ 50.
aROEdge := ROEdge lineFrom: el1 to: el2.
(aROEdge getShape: ROLine) width: 5.
popup := ROPopup text: 'some text'.
popup textColor: Color black.
popup box color: (Color r: 0.9 g: 0.9 b: 0.9); borderWidth: 1; borderColor: (Color r: 0.8 g: 0.8 b: 0.8).
aROEdge @ popup.
view addAll: { el1 . el2 . aROEdge }.
view open

Alexandre Bergel
- 11
- 1