Tooltip card / stack / graphical tooltip
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Tooltip card / stack / graphical tooltip
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
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
-
- Livecode Opensource Backer
- Posts: 404
- Joined: Tue Jan 08, 2008 3:44 pm
- Location: Kent, UK
- Contact:
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
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...
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
Hope that sorts it for you...
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
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
-
- Livecode Opensource Backer
- Posts: 404
- Joined: Tue Jan 08, 2008 3:44 pm
- Location: Kent, UK
- Contact:
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.
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.
-
- Livecode Opensource Backer
- Posts: 404
- Joined: Tue Jan 08, 2008 3:44 pm
- Location: Kent, UK
- Contact:
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
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
Do you know, I would have bet you a tenner that tooltips don't have shadows! Cleaning my glasses now...Code: Select all
set the shadow of me to false