From: John Jowett on
I have an application in which various objects are displayed in a
graphic as rectangles. To see their names I use Tooltip. What I would
like to do is implement a method to visually select one of them with
the mouse. If there was a way to get the text label from a Tooltip
into the clipboard, that would do it. I could then paste it into
another expression where I want to use it.

Does anyone know how to do this ?
Thanks,
John Jowett

From: John Jowett on
Someone sent me a private answer to this. I'm not sure why he didn't
post it here so I will not give his name. Here is the solution, not
exactly as I envisioned it but it does solve my problem:

a very useful feature of EventHandler is that it can appear inside
Graphics or Graphics3D. So you can do something like this and then
click on the disks:

Dynamic[tmp]
tmp = {};
Graphics[
{Hue[#/20], Tooltip[EventHandler[Disk[{#, 0}, 1],
"MouseClicked" :> (AppendTo[tmp, #])], #]} & /@
Range[0, 20, 2]]

Thanks to that helpful person (who can of course claim the above by
posting a reply).

John

On Jul 1, 2:27 pm, John Jowett <john.m.jow...(a)gmail.com> wrote:
> I have an application in which various objects are displayed in a
> graphic as rectangles. To see their names I use Tooltip. What I would
> like to do is implement a method to visually select one of them with
> the mouse. If there was a way to get the text label from a Tooltip
> into the clipboard, that would do it. I could then paste it into
> another expression where I want to use it.
>
> Does anyone know how to do this ?
> Thanks,
> John Jowett