Does anyone have any code for figuring out the 'size' (x,y bounds) of a string before it is displayed in a component? I'd like to be able to size a dialog box based on the size of the displayed text. Most of this is easy, but I need to be able to compute the area that is needed by the text in order to set the size of the dialog box. [Actually, the text will be an array of strings, but the problem reduces to being able to determine the display size of a string].
Or is there already a widget that is self-sizing like this? (I'm envisioning a widget that accepts a maxsize and switches to a scrollable textarea only if the actual size exceeds the maxsize.) If there isn't such a widget, the if someone can contribute the size-calculation code, I'll happily contribute the rest [i.e. the easy part!]. -Steve -- Steve Wampler [EMAIL PROTECTED] The gods that smiled upon your birth are laughing now. -- fortune cookie ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Unicon-group mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/unicon-group
