Title Back Colour Keyoti Title Line Title Curve
Blue Box Top

White Lines with TxTextControl v15.1 - RapidSpell Desktop .NET - Forum

Welcome Guest Search | Active Topics | Log In | Register

Options
PaulP
#1 Posted : Tuesday, August 25, 2015 11:11:40 AM
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
Jim
#2 Posted : Tuesday, August 25, 2015 4:36:20 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
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!


PaulP
#3 Posted : Wednesday, August 26, 2015 10:38:56 AM
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
Jim
#4 Posted : Wednesday, August 26, 2015 4:24:42 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
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!


PaulP
#5 Posted : Thursday, September 3, 2015 9:38:38 AM
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
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.




About | Contact | Site Map | Privacy Policy

Copyright © 2002- Keyoti Inc.