Hi,In my application (.NET Advantage 11.1) I have two UltraFormattedTextEditor that I want to have vertical scrollbar syncronized.I can see no event to catch the scrolling of the text or programmatically set the value of the scrollbar position.Can you help me please?ThanksStefano
Hi Georgi,I attached to this post a sample to show you how I got the sync scrolling using two RichTextBoxes and, as you can see in the project, the same code doesn't work with UltraFormattedTextEditors. I couldn't find a solution, but maybe you can find a way to make it work.ThanksStefano
Hi Stefano,
Thanks for your response, but please note that our UltraFormattedTextEditor has a lot a features that missing in the RichTextBox. More information about UltraFormattedTextEditor you could find at
http://help.infragistics.com/Help/NetAdvantage/WinForms/2011.2/CLR2.0/html/WinFormattedTextEditor_Support_Dialogs.html
http://help.infragistics.com/Help/NetAdvantage/WinForms/2011.2/CLR2.0/html/WinFormattedTextEditor.html
If you have any questions, do not hesiate to write me
Regards
Hi Georgi,I may give up on using UltraFormattedTextEditor this time, I found an acceptable solution using classic RichTextBox and Win API.However, Thank you for your time.RegardsStefano
Hello Stefano,
Maybe you could try to use PerformAction method. For example:
private void ultraFormattedTextEditor1_VScroll(object sender, ScrollEventArgs scrollEventArgs) { ultraFormattedTextEditor2.PerformAction(FormattedLinkEditorAction.Down, false, false); } private void ultraFormattedTextEditor2_VScroll(object sender, ScrollEventArgs scrollEventArgs) { ultraFormattedTextEditor1.PerformAction(FormattedLinkEditorAction.Down, false, false); }
private void ultraFormattedTextEditor1_VScroll(object sender, ScrollEventArgs scrollEventArgs)
{
ultraFormattedTextEditor2.PerformAction(FormattedLinkEditorAction.Down, false, false);
}
private void ultraFormattedTextEditor2_VScroll(object sender, ScrollEventArgs scrollEventArgs)
ultraFormattedTextEditor1.PerformAction(FormattedLinkEditorAction.Down, false, false);
Please let me know if you have any questions
Hi Georgi,
your sample solution works fine, but there is one problem: if I scroll the left textEditor, the right one scrolls too, but it doesn't show the text and "ultraFormattedTextEditor.Refresh();" is not sufficient to do it. To make it easer to verify, I just modified your sample enlarging the textEditors and adding some text. Thank you for your support.
Stefano