If I add an UltraSpellChecker to a RichTextBox, whenever I type into that box, the text flickers horribly. Any underline spelling errors also flicker. Is there any way to prevent this? I'm using 10.3.2067.
Hello jcwild,
I try to reproduce your scenarion and issue in a small sample, but without success. Could you please take a look at the attached sample and if you think that I didn`t reproduce your scenario, please feel free to modify this sample to reproduce your issue and revert it back to me. I`ll be glad to research it for you.
Regard
Sorry, I should have been more specific. If you change the SpellChecker Mode to AsYouType you should see the flickering. I verified this in your sample. It might be more obvious if you increase the font size.For some reason, the flickering seems to be worst on the top row.
Hi,
I made the mentioned changes and I try to reproduce the issue, but everything works properly. Please take a look at the attached video file. I suppose that this issue exist in your current build 10.3.2067. In my tests I`m using latest available build - 10.3.20103.2145. Please try to donwload and install this service release and check what is the new behavior. You could find the latest available service release from our site: Infragistics.com -> Accounts -> My Keys and Downlaods -> Service releases.
Let me know if you have any questions.
Regards
I just tried downloading the latest version (12.2.2006) and I'm getting exactly the same results. I tried recording this so you can see what I mean, but most of the flicker doesn't come out on the video. However, you can still see a couple of flickers on the top row, plus the red squiggles flicker (as they do in your video). When I was typing, the top row of text actually flickered almost continuously.Hmm, can't attach, it's too big. You should be able to download it from http://www.adrift.co/misc/SpellCheckFlicker.wmv.
Fantastic Mike, thanks very much! :)
Just FYI - We are going to add a new method to EditInfo called GetSubstring, which is basically like the Substring method on System.String. So you will be able to pass in the SelectionStart as the StartIndex and get the text. It should be in the service release later this month (December 2012).
Regarding the borders and theming, you have to turn off themes in order to change the borders. Windows Themes are all or nothing. You can't change a color or part of the themed element.
But... you can turn off themes selectively on the Appearance instead of on the whole control by setting the Appearance.ThemedElementAlpha to Transparent.
Appearances are resolved up the chain, though. So if you set the control.Appearance.ThemedElementAlpha to Transparent, this will affect he whole control including the ScrollBars. So you will have to do something like this:
this.ultraFormattedTextEditor1.Appearance.ThemedElementAlpha = Infragistics.Win.Alpha.Transparent;this.ultraFormattedTextEditor1.ScrollBarLook.Appearance.ThemedElementAlpha = Infragistics.Win.Alpha.Opaque;
Also, should it be possible to set BorderStyle to None without having to set UseOsThemes = False? I want to remove the border, but retain the nice scrollbars. (This is because I am placing the control inside a tab control and don't want doubled up borders).
Hi Mike,
Thanks for looking into this.
For the main part, yes, it is to identify the word clicked on by the mouse, or to identify characters around the cursor (I have created an intellisense feature, much like Visual Studio editor has), and that is typically with SelectionLength = 0. I also use it to move the cursor to the end of text which I'd normally do by setting SelectionStart to TextLength.
I appreciate that it would be a major breaking change to change this, but aren't you going to have to face that at some point anyway? Would it not be better to correct the properties, then add additional ones such as SelectionStartLegacy that returns what SelectionStart does currently, that you can phase out after a certain number of releases?
That said, as far as I'm concerned, another property that returns SelectionStart with respect to Text would be fine for me. I am actually subclassing the control and have my own SelectionStart (was easier, since I was swapping out a RichTextBox), and so I'm doing the conversion in there. I've found the quickest way to do this is to create a second hidden FormattedTextEditor (fte) with WordWrap = False, then return
EditInfo.SelectionStart + Math.Max(fte.EditInfo.GetLineNumber(EditInfo.SelectionStart) - 1, 0)
So basically I am just adding one character for every carriage return before the cursor to make up for the single character carriage returns. If you can give me a property that returns the same as GetLineNumber with WordWrap = False when WordWrapping is True, then that would also be sufficient for my purposes.
Thanks,Campbell
Hi Campbell,
I've been looking into the SelectionStart issue you reported here and I need some more information.
SelectionStart doesn't really match up to the Text property of the control due to the way some internal implementation details are handled in terms of how the Value is translated into text and the UIElements are created. And this isn't something we can change without causing (or at least potentially causing) some very serious breakage.
So what I would like to try to do is find you a solution either using the existing code or maybe exposing a new property on method on the control that gives you what you need. Currently, I can find no way to translate the SelectionStart into a position that has any reliable meaning related to the Text property on the control.
We might be able to expose a property or a method the performs a sort've conversion, but before I do that, I want to make sure I understand what you are doing here. What, exactly, are you using the SelectionStart for? Are you trying to examine text around this position? Either way, what, exactly, are you doing with that information. You mentioned a context menu - is that what this is for? If so, why can't you use the SelectedText property? Is this only for the case where SelectionLength is 0?