Upon further consideration of doing this at the
Element level, not sure if this is a bug or just my understanding. One of the things I
liked about using shapes to offset labels is that ROLightlyHighlightable highlighted both
the element and the label when I hovered over either. Referring to example below, if I
add ROLightlyHighlightable to 'inner' or 'innerLabel' then nothing at all
happens when I hover over either. However if I add ROLightlyHighlightable to
'outer' - the blue square displays only around the outside of the 'outer'
element, and no change to the 'inner' and 'innerLabel'.
--------------------------------
| view outter inner innerLabel |
view := ROView new.
outter := ROElement new + ROBorder white.
outter @ RODraggable @ ROLightlyHighlightable .
inner := ROElement sprite .
innerLabel := ROElement labelOn: 'My sprite'.
outter add: inner; add: innerLabel.
inner forward.
innerLabel forward.
"We layout the things"
ROVerticalLineLayout on: outter elements.
view add: outter.
view open
You said: "add ROLightlyHighlightable to 'inner' or 'innerLabel' then
nothing at all happens when I hover over either"
=> This is normal since inner and innerLabel forward all the events. If you want to
have have the highlight on the children element while preserving the drag and dropping of
the compound, then you have the following script:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| view outter inner innerLabel |
view := ROView new.
outter := ROElement new + ROBorder white.
outter @ RODraggable @ ROLightlyHighlightable .
inner := ROElement sprite .
innerLabel := ROElement labelOn: 'My sprite'.
outter add: inner; add: innerLabel.
inner forward: ROMouseDragging.
innerLabel forward: ROMouseDragging.
inner @ ROLightlyHighlightable.
innerLabel @ ROLightlyHighlightable.
"We layout the things"
ROVerticalLineLayout on: outter elements.
view add: outter.
view open
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.