Hi,
I'm making an operator control panel for a soft-pbx system.
I made a class (extending view) representing external telephone lines
and internal extensions.
The operator should be able to transfer a call just dragging one
line/extension over another. I also made a custom layout that handles
switched calls, and its working great.
What I could not accomplish is this: I would like to "highlight" the
target extension while dragging the source extension over it. They are
both siblings of the same class (replicated according to a dataset).
I was reading about LzTrack and basetrackgroup, but I was unable to use
onmousetrackX events while dragging (funny how we get lots of over/out
events).
What am I doing wrong?
Thanks in advance
--
Paulo
<canvas>
<class name="test" width="200" height="20">
<attribute name="debugname" type="string" value=""/>
<dragstate name="dragger" drag_axis="both"/>
<simplelayout axis="x"/>
<view name="inner" x="2" y="2" width="194" height="16" bgcolor="white">
<text name="label" fontsize="14">Test Class</text>
</view>
<!-- Normal Over/Out -->
<handler name="onmouseover">
Debug.write(debugname+" Over");
setBGColor(0xFF3333);
</handler>
<handler name="onmouseout">
Debug.write(debugname+" Out");
setBGColor(0x33FF33);
</handler>
<!-- Track Over/Out -->
<handler name="onmousetrackover">
Debug.write(debugname+" TrackOver");
setBGColor(0xFFDDDD);
</handler>
<handler name="onmousetrackout">
Debug.write(debugname+" TrackOut");
setBGColor(0xDDFFDD);
</handler>
<handler name="onmousetrackup">
Debug.write(debugname+" TrackUp");
setBGColor(0xDDFFDD);
</handler>
<!-- Drag -->
<handler name="onmouseup">
this.dragger.remove();
</handler>
<handler name="onmousedown">
this.bringToFront();
this.dragger.apply();
</handler>
</class>
<view>
<basetrackgroup bgcolor="yellow" x="20" y="40">
<simplelayout axis="y" spacing="5"/>
<test debugname="a"/>
<test debugname="b"/>
<test debugname="c"/>
<test debugname="d"/>
<test debugname="e"/>
<test debugname="f"/>
</basetrackgroup>
</view>
</canvas>