We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Tooltip function
Page Index Toggle Pages: 1
Tooltip function? (Read 764 times)
Tooltip function?
Mar 22nd, 2009, 1:37pm
 
Can anyone shed any light on how to set this function up in processing? I have seen some information about setting this up in Java using the Swing library. Is there any was of doing this in processing?
Re: Tooltip function?
Reply #1 - Mar 23rd, 2009, 2:58pm
 
I have the same problem, I would like to visualize some information about an image that is drawn on the canvas (let's say a square) without modifying the image itself,a tooltip would be very useful,  anyone has suggestions how to achieve this? Thanks guys.
Re: Tooltip function?
Reply #2 - Mar 23rd, 2009, 3:32pm
 
Perhaps look at the answers of the nearly duplicate question Text Help Required.

Processing authors strongly discourage the usage of Swing components in sketches, as it might mix badly with the PApplet code.
But you can do something similar with rect() and text() calls, with a bit of time management for set up (wait n milliseconds over target before displaying) and tear down (dismiss the tooltip after displaying it n milliseconds, or if going out of target).
Since the image is displayed in draw() with image() calls, you should draw the tooltip over it without modifying the image itself.
Page Index Toggle Pages: 1