Re: How to Drawstring with a character drawn "partially"?

From: James Westgate [Crainiate] (james_at_nospam.crainiate.com)
Date: 06/05/04


Date: Sat, 5 Jun 2004 10:37:43 +0100

DrawString(String, Font, Brush, RectangleF, StringFormat)

Use the stringformat class and set stringtrimming to none.

Otherwise use a region instead of a textrectangle.

James

-- 
Create interactive diagrams and flowcharts with ERM Diagram at
http://www.crainiate.net
"kjon" <y@y.co> wrote in message
news:%23WwTNBsSEHA.1308@TK2MSFTNGP10.phx.gbl...
> Hi, I'm trying to use Drawstring to draw a text which can let the
rightmost
> character of the text only shown partially.
>
> Have tried on DrawString(String, Font, Brush, RectangleF), which I can
size
> the rectangle with the text that fit into the rectangle will only be
drawn.
>
> But I find that if a character cannot fit into the rectangle, the whole
> character will not be drawn unless the size of the rectange increase, the
> character just cannot be drawn partially according to the rectangle size.
>
> Is it possible to do this with drawstring? Or is there any other methods
> should I use to achieve this effect? Please advice. Thanks in advance.
>
>


Relevant Pages

  • Re: How to Drawstring with a character drawn "partially"?
    ... Only if the stringtrimming is not working as expected. ... >> Create interactive diagrams and flowcharts with ERM Diagram at ... >>> character of the text only shown partially. ... >>> the rectangle with the text that fit into the rectangle will only be ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: How to Drawstring with a character drawn "partially"?
    ... Regarding drawing text character partially, I'm not too sure how to use the ... > You could draw the text without setting a layout rectangle, ... >> But I find that if a character cannot fit into the rectangle, ... >> character will not be drawn unless the size of the rectange increase, ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Drawing text without an offset
    ... Graphics.MeasureString to find the size of the rectangle that the first part ... Rectangle added to the X and Y properties of the ClipRectangle to define ... I then measure the character range for the last character. ... The region is correct as when I fill the region and draw the whole string ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Fixed Header Rectangle
    ... >> Calculate the offset of the rectangle using the DisplayRectangle Property ... >> Create interactive diagrams and flowcharts with ERM Diagram at ... so it will look like that the rectangle is not scrolling. ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: drawing text in grid cells
    ... See the StringFormat class for setting bounding boxes etc. ... DrawString does take a rectangle but you can only make sure that the text ...
    (microsoft.public.dotnet.framework.drawing)