resize font to fit control
i have a richtextbox where the user inputs his/her name.. This needs to always be 60pixels wide, regardless of text..
ie: Johnathon
or Tim
need to be resized to best fit the control.
i've looked on the net, but only found VB solutions. Is there a way to achieve this?..
Thanks..
walid86
Junior Poster in Training
65 posts since Sep 2011
Reputation Points: 17
Solved Threads: 1
yes, i agree with you antenka. i've now changed it, so the user can scale the font to the desired size, then i just output the text using the current font size etc.. now i just have to figure out finding the textbox's current X,Y, then adding these values in a pdf which is using "mm" units.. :/ argh!.. stupid idiot proof program!
ps.. you wouldn't know which is better to use..
textbox.bounds.location.x? or
textbox.location.x?
or another method to get the current X Y of the textbox?..
they both work, but i get odd results when the user moves the textbox a few times..
anyways, thanks for the reply.. :)
walid86
Junior Poster in Training
65 posts since Sep 2011
Reputation Points: 17
Solved Threads: 1