Re: Drawing an image at the end of a string

Tech-Archive recommends: Fix windows errors by optimizing your registry



By 'somekind of container', I meant if there's a control (such as a
label) that would take care of the drawing/placement for me I'd go that
route.

Now the measurestring will tell me the height/width of the entire
string, but will it tell me the width of the last line (since the
picture will be going at the end of the last character which could be
anywhere on the last line).

As I said, you need to calculate each character if not fixed length
character set in
order to calculate a whole string.

It looks like I can use solution #1 from here, but i'm not sure if its
really optimal


I'm using .net 1.1 btw, but I'll look into overrividing the usercontrol
(if it exists in 1.1)

There was never a 1.1 version of CF. 2.0 and onwards is the only version
that supports the
UserControl class. If using 1.0 (VS 2003) then you will need to inherit from
Control and handle complete painting
yourself.

Regards
Simon.


.



Relevant Pages

  • Re: Graphics.MeasureString? or Graphics.DrawString?
    ... It looks like MeasureString is pretty much useless in Vista. ... Measure String only lost the last 1 character of each legend, ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Graphics.MeasureString? or Graphics.DrawString?
    ... With your suggested changes to the MeasureString call, in Vista it now loses the last 2 characters of each legend. ... The simplest version of Measure String only lost the last 1 character of each legend, ... Rebooting to XP on the same machine, with your suggested changes to the MeasureString call, it again loses the last 2 characters of each legend. ... the following code figures out where to position all except the last character of the string and draws all except the last character of the string. ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Fixed-Width fonts
    ... > Does Windows have a fixed-width font that I can use? ... I'm calculating my character columns by the width of 1 character ... > but characters in a string aren't lining up due to what I mentioned above. ... "The MeasureString method is designed for use with individual strings ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Graphics.MeasureString? or Graphics.DrawString?
    ... With your suggested changes to the MeasureString call, in Vista it now loses the last 2 characters of each legend. ... The simplest version of Measure String only lost the last 1 character of each legend, ... Rebooting to XP on the same machine, with your suggested changes to the MeasureString call, it again loses the last 2 characters of each legend. ... the following code figures out where to position all except the last character of the string and draws all except the last character of the string. ...
    (microsoft.public.dotnet.framework.drawing)
  • [TOMOYO #15 3/8] Common functions for TOMOYO Linux.
    ... This file contains common functions (e.g. policy I/O, pattern matching). ... Since TOMOYO Linux is a name based access control, ... TOMOYO Linux's string manipulation functions make reviewers feel crazy, ... the Linux kernel accepts all characters but NUL character ...
    (Linux-Kernel)