如何更改在 Roasal 中将鼠标悬停在边缘时出现的文本?我在网上的任何地方都没有找到这个
问问题
88 次
2 回答
1
您可以通过以下方式将弹出窗口(具有自定义样式)添加到单个边缘:
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.
于 2013-05-02T12:02:30.317 回答
1
一个完整的例子可能是:
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
于 2013-05-02T20:00:06.497 回答