| View previous topic :: View next topic |
| Author |
Message |
Sergey Tkachenko Site Admin
Joined: 27 Aug 2005 Posts: 6576
|
Posted: Tue Sep 06, 2005 5:26 pm Post subject: [Demo] Dual editor for translators |
|
|
Demo:
http://www.trichview.com/support/files/dualeditor.zip
A helper for human translators. It has two editors - one for the original text and one for the translated text. This screenshot shows English text and its Russian translation:
This demo does two things:
1) synchronizes scrolling
2) highlights the currect paragraph in the focused editor, and the corresponding paragraph in another editor.
While (1) is a straightforward procedure, (2) is a kind of trick, because
custom drawing events were not designed for such things, and it slows down editing (because it needs to repaint both editors on each caret movement). If you decide to implement (2) in your application, I recommend to make it optional. |
|
| Back to top |
|
 |
lkessler
Joined: 01 Sep 2005 Posts: 87 Location: Winnipeg, Manitoba, Canada
|
Posted: Tue Sep 06, 2005 11:36 pm Post subject: |
|
|
It would seem to me that this could be used to implement a splitter to divide a RVEdit window into two screens. That's something I will want to implement in the future. However, I will need it to work with tables.
Also, is the Invalidate function "smart" in knowing that it only needs to refresh the screen and not need to reformat? |
|
| Back to top |
|
 |
Sergey Tkachenko Site Admin
Joined: 27 Aug 2005 Posts: 6576
|
Posted: Wed Sep 07, 2005 9:52 am Post subject: |
|
|
| This demo does not modify the second editor, if the text in the first editor is changed. It only highlights paragraph with the same index. |
|
| Back to top |
|
 |
Nostradamus
Joined: 13 May 2006 Posts: 28
|
Posted: Sat May 13, 2006 2:14 pm Post subject: Displaying 'Filename' for open document/file |
|
|
Hello Sergey,
1 How do I display filenames {in a status bar TPanel} in the dualeditor for two open documents?
Would this be done the same way as for Editor 2 in the demos provided?
2 When I do SaveAs,,,
when the dialog window opens .... How do I get the current filename to appear in the window where it asks name of file?
Any help is appreciated
Richard |
|
| Back to top |
|
 |
Sergey Tkachenko Site Admin
Joined: 27 Aug 2005 Posts: 6576
|
Posted: Mon May 15, 2006 1:45 pm Post subject: |
|
|
Yes, do it like in the Editor2 demo.
TRichView does not store names of files, you need to do it yourself (or use RichViewActions) |
|
| Back to top |
|
 |
|