Re: Center text within a field?

2007-06-07 Thread Trevor DeVore
On Jun 7, 2007, at 9:34 AM, Joe Lewis Wilkins wrote: Congrats, Trevor. If you've come up with an acceptable handler that performs well, then my suggestion is entirely moot at this time. I'm surprised that you were able to come up with a good solution in the time frame you mention. Great!

Re: Center text within a field?

2007-06-07 Thread Joe Lewis Wilkins
Congrats, Trevor. If you've come up with an acceptable handler that performs well, then my suggestion is entirely moot at this time. I'm surprised that you were able to come up with a good solution in the time frame you mention. Great! Joe Wilkins On Jun 7, 2007, at 9:24 AM, Trevor DeVore

Re: Center text within a field?

2007-06-07 Thread Trevor DeVore
On Jun 6, 2007, at 4:47 PM, J. Landman Gay wrote: So it's font dependent and we're back where we started. :( You may be stuck with your images after all, since there is no good way to read the actual positioning of the glyph inside its text box. I think I will post a feature request for get

Re: Center text within a field?

2007-06-07 Thread Trevor DeVore
On Jun 6, 2007, at 5:09 PM, Joe Lewis Wilkins wrote: I realize it would take a lot of initial work, but you guys seem up for it: why not just use a lookup table with the exact values you need for each font "condition" listed? Hi Joe, I think the time to research all of the possible scenari

Re: Center text within a field?

2007-06-06 Thread Chipp Walters
On 6/6/07, J. Landman Gay <[EMAIL PROTECTED]> wrote: Joe Lewis Wilkins wrote: > I realize it would take a lot of initial work, but you guys seem up for > it: why not just use a lookup table with the exact values you need for > each font "condition" listed? Geek rule #26: It isn't cool unless yo

Re: Center text within a field?

2007-06-06 Thread J. Landman Gay
Joe Lewis Wilkins wrote: I realize it would take a lot of initial work, but you guys seem up for it: why not just use a lookup table with the exact values you need for each font "condition" listed? Geek rule #26: It isn't cool unless you can build an algorithm to do it. ;) -- Jacqueline Landm

Re: Center text within a field?

2007-06-06 Thread Joe Lewis Wilkins
I realize it would take a lot of initial work, but you guys seem up for it: why not just use a lookup table with the exact values you need for each font "condition" listed? Of course, you can limit the amount of preparation by just limiting the acceptable fonts and perhaps some of the other

Re: Center text within a field?

2007-06-06 Thread J. Landman Gay
Trevor DeVore wrote: On Jun 6, 2007, at 4:01 PM, J. Landman Gay wrote: Version 2: on mouseUp set the width of fld 1 to the width of grc 1 get the textsize of fld 1 if it < 20 then add 5 to it set the textheight of fld 1 to it set the height of fld 1 to it set the loc of fld 1 to th

Re: Center text within a field?

2007-06-06 Thread Trevor DeVore
On Jun 6, 2007, at 4:01 PM, J. Landman Gay wrote: Version 2: on mouseUp set the width of fld 1 to the width of grc 1 get the textsize of fld 1 if it < 20 then add 5 to it set the textheight of fld 1 to it set the height of fld 1 to it set the loc of fld 1 to the loc of grc 1 end mou

Re: Center text within a field?

2007-06-06 Thread J. Landman Gay
Trevor DeVore wrote: Unfortunately it won't work in all cases. Using a field with the text set to "1" and the textfont set to "webdings" is a good test case. The problem is that even though you may have the textsize set to 100, the vertical space taken up by the character is only 70 pixels (on

Re: Center text within a field?

2007-06-06 Thread Trevor DeVore
On Jun 6, 2007, at 1:07 PM, J. Landman Gay wrote: Does this work? : on mouseUp set the width of fld 1 to the width of grc 1 -- the circle get the textsize of fld 1 set the textheight of fld 1 to it + (it div 3) set the height of fld 1 to the formattedheight of fld 1 set the margins of

Re: Center text within a field?

2007-06-06 Thread J. Landman Gay
Trevor DeVore wrote: On Jun 6, 2007, at 3:43 AM, Trevor DeVore wrote: I'm trying to center text in a field within a graphic (circle). The text can be any font and any size. Update - I haven't been able to find a reliable means of calculating the center of text using any field properties so I

Re: Center text within a field?

2007-06-06 Thread Trevor DeVore
On Jun 6, 2007, at 3:43 AM, Trevor DeVore wrote: I'm trying to center text in a field within a graphic (circle). The text can be any font and any size. Update - I haven't been able to find a reliable means of calculating the center of text using any field properties so I resorted to expor