sez [EMAIL PROTECTED]:
>I have a little 'tree' list in a field, using inline images to display
>disclosure triangles next to non-terminal nodes. ...
>The only thing is this: when the user selects a line (by clicking somewhere
>other than the disclosure triangle) I want it do display selected, ie using
>the hilited line.  But when they click on the triangle, I don't want to
>change which line is selected (at least unless the selected line is hidden
>as a result of the toggle); I want people to be able to conveniently view
>the tree structure, opening and closing sub-trees, without modifying which
>item they've currently got selected.
>Here I get stung because the engine hilites the line as soon as they click
>on it. ...
>Whaaaa.  Why shouldn't we be able to  have listBehaviour without autoHilite?

   Why bother with auto-hilite when you can "roll your own" line-hiliting 
code? Here's a handler which is perfectly happy to hilite whatever line the 
pointer is over, and update the hiliting in real time. It's HyperTalk, hence 
may need a bit of massaging to do the job in MC/Rev, but it's *functional* 
HyperTalk! This handler lives in the script of whichever field you want to 
have display this behavior. The global variables LineNum, StartChar, and 
EndChar may prove useful in a mouseUp handler in the same field...

on mouseWithin
  global LineNum,StartChar,EndChar
  put the mouseV - the top of me - 1 into DiScroll
  put 1 + (DiScroll div (the textHeight of me)) into LineNum
  if LineNum is 1 then put 1 into StartChar
  else put the number of chars of line 1 to (LineNum - 1) of me + 2 into 
StartChar
  put the number of chars of line 1 to LineNum of me + 1 into EndChar
  select char StartChar to EndChar of me
end mouseWithin

   Hope this helps...
_______________________________________________
improve-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/improve-revolution

Reply via email to