[plt-scheme] cue-text%
It appears that `cue-text%' doesn't override `copy-self', so you get a
plain `text%' back. I've added an overriding `copy-self' in SVN.
At Sat, 04 Apr 2009 23:15:38 +0200, Jens Axel Soegaard wrote:
> A cue-text:
>
> Gives a text% an instantiation argument of a string that is displayed
> in the text% initially in grey; the text disappears when the text gets
> focus. This technique is useful for labeling texts without needing to
> take up space.
>
> If I put the cue-text into an editor-snip%, the cue is not cleared.
> Is this a bug, or is this to be expected?
>
> #lang scheme/gui
> (require embedded-gui framework)
> (new editor-snip%
> [editor (new cue-text% (cue-text "Hello World"))])
>
> Note, that if the cue-text is displayed in its own frame, then
> the cue is cleared:
>
> #lang scheme/gui
> (require embedded-gui framework)
>
> (define f (new frame% (label "f") (width 400) (height 400)))
> (define e (new text%))
> (define c (new editor-canvas% (editor e) (parent f)))
> (define t (new cue-text% (cue-text "Hello, World!")))
> (define s (new editor-snip% (editor t)))
> (send e insert s)
> (send f show #t)
>
>
>
> --
> Jens Axel Søgaard
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme