<<
Anyone have something like that or know what the equation would be so I can 
write it?
>>


This is called Font Metrics and there are routines built into Windows (or, at 
least, into Delphi which I think calls the built in Windows fonts) to calculate 
how many pixels are required for a given string..

The logic is that you create a thingy of the right type (edit box, label, etc) 
and call GetTextExtent with a string argument, and it returns a height and 
width in pixels for the rectangle needed to write the text on that control 
(given the current font settings).  It's possible you can call the necessary 
internal Windows functions directly from R:Base.  If not, it would be fairly 
straightforward to write something to do this.
--
Larry

Reply via email to