J
John B
I need to create a label with the last character drawn in red.
My idea was to create a label and override OnPaint.
So far so good.
I then measure the character range for the last character.
All good.
Then when I call drawstring and pass the rectangle I get via
Region.GetBounds(Graphics) it draws it with the same offset as the
beginning of the label.
Not good.
Question is, how can I stop it from doing this?
TextRenderer.DrawText does the same thing.
Failing this, is there another way I should be doing this?
The region is correct as when I fill the region and draw the whole
string normally, the last character falls smack into the filled region.
Cheers
JB
My idea was to create a label and override OnPaint.
So far so good.
I then measure the character range for the last character.
All good.
Then when I call drawstring and pass the rectangle I get via
Region.GetBounds(Graphics) it draws it with the same offset as the
beginning of the label.
Not good.
Question is, how can I stop it from doing this?
TextRenderer.DrawText does the same thing.
Failing this, is there another way I should be doing this?
The region is correct as when I fill the region and draw the whole
string normally, the last character falls smack into the filled region.
Cheers
JB