|
Rank: Newbie
Groups: Registered
Joined: 8/25/2015 Posts: 3 Location: Bath, UK
|
Hello, We've recently been adding RapidSpell to a legacy program that is unfortunately stuck using TXTextControl v15.1. I've got the latest RapidSpell .NET v5.3 and using the NET2.TXSupportv15.1 dll I have successfully added spell-checking to the program and it all seems to be working fine, but we have noticed that with some fonts and font sizes we are experiencing white lines obscuring part of the text while typing (Arial is particularly bad for this). I found the following thread here on the forums: https://keyoti.com/suppo...aspx?g=posts&t=2028 This has what I suspect is a similar issue with RichTextControl, and I hoped to be able to use the same solution to fix my problem, but the TxTextControlAdapter doesn't seem to have the GetBaselineOffsetAtCharIndex function to override. Is there any way to fix this issue? Any help would be greatly appreciated. Thanks Paul Pollard
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 Location: Canada
|
Hi Paul, thanks for posting. Yes back in the v15.1 days we had to use a hack to get the underlines to appear, which involved painting underlines and then erasing them with white lines. Those white lines are what you see if the underlines are not perfectly under the font. An engineer at TX actually developed that with us, and so I am afraid it can't get much better than it is. That's why in either 16 or 17 (unsure) they started painting the underlines as part of TextControl itself. I believe you should have a txTextControlAdapter control on your form, that has a property UnderlineYOffset which you can tweak to try and improve things. Best Jim -your feedback is helpful to other users, thank you!
|
|
Rank: Newbie
Groups: Registered
Joined: 8/25/2015 Posts: 3 Location: Bath, UK
|
Hi Jim,
Thanks for the suggestion, I hadn't noticed that property.
I've also managed to confirm that the problem is when the font/size combination doesn't provide enough of a gap between text lines to account for the underline, but I've been unable to find any way to increase this gap, so adjusting the Y offset of the underlining up would help,.
I've tried changing it (By everything from 0 to >200) and it doesn't seem to have any effect on the visual output at all. Should I be doing this at runtime only or am I missing something else?
Regards Paul
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 Location: Canada
|
Unsure, I've checked the code and UnderlineYOffset is definitely used. Do you have 2 txTextControlAdapter controls on the form? One of them would be for the RapidSpellDialog control and won't have any effect on underlines. -your feedback is helpful to other users, thank you!
|
|
Rank: Newbie
Groups: Registered
Joined: 8/25/2015 Posts: 3 Location: Bath, UK
|
I've only got a single txTextControlAdapter for each TxTextControl on the form, which has the TxTextControl set in its TextControl property. Each TxTextControl is added to the RapidSpellAsYouType object via AddTextComponent, so I'm not using RapidSpellDialog at all. I've managed to get around the problem by using a modification of the functionality here; http://www.textcontrol.c.../blog/archive/20101015/
When a change is made I just check each paragraph and if its line spacing is set to lower than 1.2 I bump it up. It's not the cleanest solution I'm sure, but it seems to work for what I need. Thanks for your help, Paul
|
|