#12000/12/28 23:30:57
找了找,当初有一个对写的Text的Behavior可以实现Hilite功能.。不过,text的Editable属性必须打开。
on mouseWithin me
Mouseselectline=sprite(1).pointToLine(the mouseloc)
if Mouseselectline>0 then
repeat with i=1 to Mouseselectline-1
temotext=temotext&member(1).line[i]&return
end repeat
startchar=length(temotext)
endchar=startchar +length(member(1).line[Mouseselectline])+1
cursor 280
member(1).selection=[startchar,endchar]
else
cursor -1
end if
end
on mouseLeave me
cursor -1
end