Re: Repost: DrawString and ellipsis problem ... please help
From: Bob Powell [MVP] (bob_at__spamkiller_bobpowell.net)
Date: 01/07/05
- Next message: Bob Powell [MVP]: "Re: GDI+ DrawString space between words"
- Previous message: Herve Bocuse: "Re: GDI+ DrawString space between words"
- In reply to: Herve Bocuse: "Repost: DrawString and ellipsis problem ... please help"
- Next in thread: Herve Bocuse: "Re: Repost: DrawString and ellipsis problem ... please help"
- Reply: Herve Bocuse: "Re: Repost: DrawString and ellipsis problem ... please help"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 7 Jan 2005 18:23:35 +0100
GDI and GDI+ are two completely different systems. The ellipsis drawing are
different and so create a different effect.
If you need to have the exact same output as in your pervious app using GDI
then you must use interop to drive the GDI DrawText API.
-- Bob Powell [MVP] Visual C#, System.Drawing Find great Windows Forms articles in Windows Forms Tips and Tricks http://www.bobpowell.net/tipstricks.htm Answer those GDI+ questions with the GDI+ FAQ http://www.bobpowell.net/faqmain.htm All new articles provide code in C# and VB.NET. Subscribe to the RSS feeds provided and never miss a new article. "Herve Bocuse" <cadilhac@gmail.com> wrote in message news:1105103070.015927.239720@f14g2000cwb.googlegroups.com... > Hi, > > I posted some time ago in December the following message and got no > answer. It is very important to me to solve this problem and I wish > that MVP people or anyone else could study with me this problem. It > could give birth to a wonderful custom control ;) > > Thanks in advance, here it is : > > I come from the MFC world and I can't get the same behaviour I add in > my old app with a new dotnet app written in C#. > > I have a rectangle with a string inside and the user can drag the mouse > on the right side of the rectangle to shrink its width. While > shrinking, a string "abcd" is progressively displayed as: > > abcd > abc... > ab... > a... > a.. > a. > > With the StringTrimming.EllipsisCharacter flag set in C# I get: > > abcd > abc... > ab... > a... > abc > ab > a > > It means that as soon as the "..." characters can't be displayed > completely, then the string is displayed again (at least the characters > that fit in the rectangle). > Any idea ? > > Thanks a lot for your help > > Herve >
- Next message: Bob Powell [MVP]: "Re: GDI+ DrawString space between words"
- Previous message: Herve Bocuse: "Re: GDI+ DrawString space between words"
- In reply to: Herve Bocuse: "Repost: DrawString and ellipsis problem ... please help"
- Next in thread: Herve Bocuse: "Re: Repost: DrawString and ellipsis problem ... please help"
- Reply: Herve Bocuse: "Re: Repost: DrawString and ellipsis problem ... please help"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|