更改悬停时弹出窗口中显示的边缘名称

时间:2013-05-01 12:46:52

标签: pharo roassal

如何更改将鼠标悬停在Roasal边缘时显示的文字?我没有在网上找到这个

2 个答案:

答案 0 :(得分: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.

答案 1 :(得分: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
相关问题