Hi all,
I am currently experiencing the following problem.
I am adding text to an UltraTextEditor and afterwards scroll to its bottom.Doing this in a loop causes the scroll-bar to jump up and then down all the time resulting in a blinking/flickering experience that is kind of "unwanted" ;)
I added a sample for a better explanation.
If you have any questions just let me know.
Thanks for your time and best regardsAndy
Hi,
I tried this out and I get the same results. But I don't think there's anything we can do about this. You have your UltraTextEditor set to AlwaysInEditMode. This means that the control has a child control in it which is an inbox TextBox control. And it is this TextBox control which is showing the scrollbar and the text and displaying this scrollbar flickering.
I tried using a regular TextBox control and doing the same thing you are doing and I get the same results as with UltraTextEditor.
I'm guessing that you are using this UltraTextEditor as some sort of status update, similar to the Output window in Visual Studio where you display the status of some ongoing process. I had a similar problem with an application I wrote in-house here - not only with the scrollbar flickering but also with performance. In my case, I found that appending text to the TextBox really started to slow down significantly once the text got large.
To solve that problem, I replaced my TextBox with a WinGrid. That way, I could add each element of the status as a line in the grid instead of updating one large string. So you might want to consider taking an approach like that using a grid or maybe a ListView or ListBox.
Hi Mike,good hearing from you, I hope you are doing fine :)Your assumption about what I am trying to do was totally right. I am parsing messages returned via print statements from a stored procedure.Hundreds of output lines and yes, performance is also a problem ;)
I like the idea with the grid, but in this case a text box like view would be preferred because people have co copy and paste the output (or parts of it).A button that copies the content to the clipboard would be fine if all of the output should be copied, but I am still thinking about what to do when users only want to copy parts of it.
I thought about using the grid during the actual output procedure and when it's done I could use a text box control to put everything together from the gridrows and place it in a text box after outputting is done... I have to talk to my colleagues about that.
Thanks for your response Mike, it is very much appreciated
have a great day Mike,
best regardsAndy
Hi Andy,
You could try using UltraFormattedTextEditor, instead of UltraTextEditor. But to be frank, I tried that for my own app, and while I don't remember there being any scrollbar issues, the performance was just as bad, if not worse, than the UltraTextEditor / TextBox.
If copy and paste is an issue, WinGrid does have support for copying and pasting rows or cells. So it wouldn't be quite as flexible as copying raw text, but it might work.
Hi Mike,
good suggestion, but honestly I'll have to skip this try for now.I checked out the grid version and it worked fine, but after all it seems to be too confusing for the user, who is, so I was told, not interested in the output "while outputting".
So I suspended the output, show a "loading" animation and just fill the texteditor after everything is done.
Anyway, thanks for your help Mike, if I ever try the UltraFormattedTextEditor option I'll let you know how it worked out :)
best regards
Andy