There are two methods I discovered: text-size: get in layout reduce [ 'origin 0 'text "example string" ] 'size
text-size: size-text f: make-face/size/spec 'text 1000x100 [ text: "example string" ] I found the second operates faster. I just remembered they give different results for height (87x19 and 87x15) but I only needed width at the time I wrote it. I haven't figured out why yet. Anton. > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of > Henrik Mikael Kristensen > Sent: Saturday, 6 December 2003 5:51 pm > To: [EMAIL PROTECTED] > Subject: [REBOL] Text width in VID (Was: Re: Compressing image data > (bugs?)) > > > > Carl Read wrote: > > Also, if you're dealing with an image created by REBOL, you could use > > save/png to create a compressed binary of the image. ie... > > That's very clever. Keep the ideas coming! ;-) > > I'm also toying with size adaptable buttons, which size themselves to > the text, so it doesn't wrap, and allow for resizing the main window > with the buttons without screwing up the text and for resizing the > column in a listview and make sure, text is never obscured. > > I can't use automatic calculations for the button size, because I need > to be able to resize the button from the minimum size of the text width > and up. > > I've come up with making an image of a layout with the text string and > then determining its width from image/size/x and it works well. But it > seems a little cumbersome, but is (not yet) performance critical for my > application. > > Still, are there easier ways? > > -- > Regards, > Henrik Mikael Kristensen -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.