Page 1 of 1

Tooltip card / stack / graphical tooltip

Posted: Mon May 26, 2008 12:14 pm
by andyh1234
Does anyone know if it it possible to open a stack / card and have it display like a tooltip.

Id like to give the user some more information about a database entry when they hover over an entry, like a tooltip but the information contains a pie chart so Id need to have a card / stack come up with the chart on it, then when the user moves over a different entry it can change.

I can use the text handlers to figure out what the user is hovering over, but what is the best way to load a card as if it were a tooltip, has anyon e else tried this?

Thanks

Andy

Posted: Mon May 26, 2008 2:51 pm
by gyroscope
Hi Andy

One way would be to make a subStack with as many cards as you have pie charts, set the background of the stack to yellow if required, and add all of your pie charts to the cards.

In the preOpenStack handler of this subStack, put

Code: Select all

 set the decorations of me to empty
set the shadow of me to false
 
Then when your hovering place is triggered, in its handler set it to open the appropriate card of the substack, with the script to includethe positioning of the subStack in relation to the database entry.

Hope that sorts it for you...

:)

Posted: Mon May 26, 2008 6:17 pm
by andyh1234
Thanks, that works ok so far.

One problem though is when the tooltip stack is shown is grabs focus from the text box, so the user is no longer able to click through the box using the up and down arrows, only the mouse works.

If I use the 'focus on' command to return the focus to the text box, the tooltip disappears behind the window.

Any thoughts on how I can get the tooltip stack to show, but not to take any sort of input or grab the focus at all, im sure it is possible but cant think of it at the moment!!

I know I can set all the focus options to none, but as soon as I return focus to the text box, the tip window vanished behind the current card.


Andy

Posted: Mon May 26, 2008 6:32 pm
by Klaus
Hi Andy,

you can:

1. Still use the trick with setting the "focus" back but then you should
2. Open the "tooltips" as palette ;-)
3. To add a bit of "eyecandy": set "the blendlevel" of the "tooltip" stack to 50 or hwatever before opening


Regards

Klaus

Posted: Mon May 26, 2008 11:48 pm
by gyroscope
Hi Andy

I've learnt something from Klaus there as well! i.e setting the "mock tooltip" window as a palette keeps the focus of elements in the one field...

Anyhow, I'm sure you know this but just in case not: to get rid of the palette window bar, import a white image the same size as the palette window and set its Shape in its Inspector to that image.

:)

Posted: Tue May 27, 2008 8:21 am
by Klaus
Hi gyroscope,

no need to use a windowshape, seems to be overkill in this case!

Just "set the decorations" of that stack to empty and set its style to "palette".
Noone will tell the difference ;-)


Best

Klaus

Posted: Tue May 27, 2008 12:05 pm
by gyroscope
Hi Klaus

I did try empty decorations on a palette yesterday but it wasn't playing nicely, for some reason. Tried it again today, and it works fine.

Thank you for that! :)

Hi Andy

Code: Select all

set the shadow of me to false
Do you know, I would have bet you a tenner that tooltips don't have shadows! Cleaning my glasses now... :wink:

Posted: Tue May 27, 2008 5:06 pm
by andyh1234
Brilliant!

Palette stack "Tooltip"

followed by...

Show stack "Tooltip"

works a treat, thanks.

Andy