Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Character spacing annoyance

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support
View previous topic :: View next topic  
Author Message
floele



Joined: 04 Aug 2008
Posts: 22

PostPosted: Sun Mar 08, 2009 7:16 pm    Post subject: Character spacing annoyance Reply with quote

Hi,

I noticed a small, but somewhat annoying visual glitch when using the virtual tree. Check the following picture:



The red lines indicate the column width. If you decrease it, so that "..." is added to the text, the character spacing increases. Could you possibly fix that? It doesn't happen with usual ListViews either and it feels somewhat distracting when resizing columns.

Regards,
Florian
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Sun Mar 08, 2009 9:29 pm    Post subject: Reply with quote

We will take a look at the issue.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
floele



Joined: 04 Aug 2008
Posts: 22

PostPosted: Wed Apr 15, 2009 8:51 am    Post subject: Reply with quote

I had a quick look at it myself now.
The problem seems to be, that you are using the DrawString-Method along with the StringTrimming enum. In this case GDI+ is doing the weired drawing. I think that you should use the TextRenderer class instead (see also http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=95852).
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed Apr 15, 2009 11:05 pm    Post subject: Reply with quote

Thanks for tracking that link down. We'll be taking a look at this issue this week.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon Apr 27, 2009 5:43 am    Post subject: Reply with quote

We will be releasing version 3.12 soon. This will include a CompatibleTextRendering property in the Style class that enables you to choose the text rendering engine to use (false = GDI, true = GDI+). GDI handles text truncation better than GDI+ and so setting this to false will fix this glitch.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed Apr 29, 2009 9:49 am    Post subject: Reply with quote

Version 3.12.0 has now been released. If you set the CompatibleTextRendering property to false for the RowStyle then text truncation will behave as you want. You can set this as the default for your whole application by setting the shared (static) property Style.CompatibleTextRenderingDefault.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
floele



Joined: 04 Aug 2008
Posts: 22

PostPosted: Wed Jun 03, 2009 8:30 am    Post subject: Reply with quote

Thanks for your efforts, much appreciated. I didn't get to testing it yet, but I'll let you know as soon as I do.
Back to top
View user's profile Send private message
floele



Joined: 04 Aug 2008
Posts: 22

PostPosted: Sat Oct 03, 2009 9:14 am    Post subject: Reply with quote

Tried it now: Works great Smile
Really feels much better this way, when resizing columns.
Back to top
View user's profile Send private message
floele



Joined: 04 Aug 2008
Posts: 22

PostPosted: Tue Oct 06, 2009 9:00 am    Post subject: Reply with quote

I think I found a little bug now:
By default, the the ampersand (&) mnemonic-prefix character is interpreted by DrawText, so the text is displayed incorrectly in the TreeView when having a "&" in the text (which should bot be interpreted as access key).

You can fix that by adding
Code:
flags |= TextFormatFlags.NoPrefix;
before calling DrawText().
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue Oct 06, 2009 9:06 am    Post subject: Reply with quote

Yes we should probably fix that since there is not really a use for displaying mnemonic in tree nodes. You can probably work around the issue for now by using && to display an & (at least this works for escaping the special meaning of & in toolstrips).
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
floele



Joined: 04 Aug 2008
Posts: 22

PostPosted: Tue Oct 06, 2009 11:22 am    Post subject: Reply with quote

I can work around it anyway, since I have the source code. So need to hurry with a release for me Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group