Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Tooltip text to Clipboard ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg110974] Re: Tooltip text to Clipboard ?
  • From: John Jowett <john.m.jowett at gmail.com>
  • Date: Thu, 15 Jul 2010 03:10:04 -0400 (EDT)
  • References: <i0i1jr$hoj$1@smc.vnet.net>

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... at 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



  • Prev by Date: Re: Simplest way to get 2 digits from an integer...
  • Next by Date: Re: Mathematica link to a c++ lib
  • Previous by thread: Tooltip text to Clipboard ?
  • Next by thread: Re: Run Package vs Needs