Option 1: if you add the event listener to the
textArea.systemManagerinstead of the textArea it will register the
mouseevents outside of the
textArea.

Option 2 (maybe):  can use textArea.selectionBeginIndex/selectionEndIndex as
a source in a binding to a function that sets the selection of the other
textarea?

- Dan

On 12/1/06, Jon Rowland <[EMAIL PROTECTED]> wrote:

   Hi,

I'm trying to write a hex viewer, where one TextArea shows the hex values,
and another the ASCII values, e.g.

41 42 43 44 ABCD
45 46 47 48 EFGH

I need the TextAreas to show a synchronised selection, so if you select 42
-> 45 in the first box, area 1, B-E is selected in the second box. I've
overcome my first problem (that of the TextArea control hiding selection on
lost focus), but I can't seem to find a nice way to synchronise the
selections. There doesn't see to be a selectionChanged event, and trying to
use mouse click, down, up or move fails in odd cases ( e.g. when you move
the mouse off the control with the mouse still held down, the selection
changes but the events no longer fire).

Anyone have any bright ideas?

Thanks in advance,
Jon Rowland


 This e-mail is bound by the terms and conditions described at 
http://www.subexazure.com/mail-disclaimer.html

Reply via email to