0 Replies Latest reply on Dec 1, 2006 8:13 AM by jr4742

    TextArea synchronised selection


      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