[ltk-user] selected text
Felip Alàez Nadal
uu.nix.uu at gmail.com
Wed Nov 15 13:06:21 UTC 2006
Hello:
I believe you should use:
(text text-widget)
2006/11/15, Phil Armitage <philip.armitage at gmail.com>:
> Hi,
>
> I'm starting to use LTK but there's one feature I need and have been
> unable to find. Essentially I want to be able to retrieve the selected
> text in a text widget. I searched through the docs and source but
> couldn't find anything (I apologize if I've missed it).
>
> I'm very new to Lisp (and Tk!) but I managed to write this:
>
> (defmethod selected ((text text))
> (format-wish "senddatastring [~a get sel.first sel.last]" (widget-path text))
> (read-data))
>
> ...which works but causes problems if no text is selected.
>
> Is there an obvious way around this (or, even better, an existing
> function to do the job that I've just missed)?
>
> Many thanks in advance for any help you can offer (and thanks to Peter
> for writing the library!).
>
> Phil
> _______________________________________________
> ltk-user site list
> ltk-user at common-lisp.net
> http://common-lisp.net/mailman/listinfo/ltk-user
>
--
Felip Alàez Nadal
More information about the ltk-user
mailing list