On Wed, 13 Aug 2008 18:14:15 -0700, John B <jb******@yahoo.comwrote:
Does anyone know how to determine the exact coordinates of the text
within a label/checkbox/whatever?
I know I could use MeasureCharacterRanges but I think there's an easier
way.
What could be easier than getting an exact measurement of where the text
is and calculating its position based on that?
Actually, I should point out that for text display in Forms, you really
want TextRenderer.MeasureText(), because if I recall correctly
TextRenderer is what the Forms controls use to display text. Getting
exactly correct measurements can be tricky, because there's a lot of
formatting options. :) But assuming you get it right, it should give you
exactly the information you want (assuming you really want "the exact
coordinates of the text within a label/checkbox/whatever").
Pete