[plt-scheme] Autowrap in embedded text% snip

From: Erich Rast (erich at snafu.de)
Date: Wed Mar 25 15:57:11 EDT 2009

I just can't get this to work. :-/ I've made both editors instances of  
text:wide-snip%. I create a snip from the first editor using (new  
editior-snip% (editor theeditor)) and in the embedding editor tried   
(send editor add-tall-snip snip) which has no visible effect at all.

I've also tried

  (let ((snip (new-box-editor-snip 'ask ""))) ; my function that  
returns a snip
       (send editor insert snip)
       (send editor add-tall-snip snip))

This displays the embedded snip, but still no word wrapping or  
automatic resizing. Both editors are instances of text:wide-snip%

Is there an example somewhere that illustrates how add-wide-snip, add- 
tall-snip, and text:wide-snip% work?

Best regards,


> The framework has some support for that. Try searing for 'wide-snip'
> in the docs.
> Robby
> On 3/23/09, Erich Rast <erich at snafu.de> wrote:
>> x-height also doesn't seem to affect the wrapping.
>> What I'd like to have is various embedded editors that extend  
>> vertically
>> as you type and automatically wrap text according to the width of the
>> embedding editor. When the outer text% is resized, the embedded  
>> editor
>> snips should resize their width, too, but always display their whole
>> content, i.e. only resize their height such that all of the content
>> remains visible.

Posted on the users mailing list.