Tool tips

Want to talk about something that isn't covered by another category?

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

anmldr
Posts: 442
Joined: Tue Sep 11, 2012 11:13 pm

Re: Tool tips

Post by anmldr » Thu May 28, 2020 7:08 pm

Nope, Richmond62. Zooming like that will not work for me either. For one, I will probably get motion sickness with constant zooming in and zooming out. Seriously, not teasing about the motion sickness.

BTW, the tooltip is still hidden by the cursor when zooming.

I will do OK until/if LC changes the behavior. I will continue on as I have been doing.

Linda

anmldr
Posts: 442
Joined: Tue Sep 11, 2012 11:13 pm

Re: Tool tips

Post by anmldr » Thu May 28, 2020 7:14 pm

Now, if only the IDE would work the way that your stack works with the tooltips, all would be well.

It is not stacks that I am making that have the problem, it is the LiveCode IDE that has the problem. I have not tried putting tooltips in the practice stacks that I have made so far.

But, as I mentioned before, it may be a Mac problem that LC cannot correct.

Linda

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5402
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Tool tips

Post by richmond62 » Thu May 28, 2020 7:14 pm

Pop over to the Feature request I filed and see what you think, and add as much as you want. 8)

bogs
Posts: 5129
Joined: Sat Feb 25, 2017 10:45 pm

Re: Tool tips

Post by bogs » Thu May 28, 2020 8:41 pm

That picture you posted is an excellent example of what I said earlier Linda. As for attaching it to a bug report, you just click on 'Attachment' at the top'ish part of the page, and you can attach pictures and such.
Image

anmldr
Posts: 442
Joined: Tue Sep 11, 2012 11:13 pm

Re: Tool tips

Post by anmldr » Thu May 28, 2020 10:40 pm

you can attach pictures
Done

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5855
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Tool tips

Post by jacque » Fri May 29, 2020 8:08 pm

richmond62 wrote:
Thu May 28, 2020 7:02 pm
My personal preference (just to throw a spanner in the works) is to use bespoke images for tooltips when necessary.
It's easier to display a field which can be reused for every tooltip and doesn't require creating and storing all those image files. Set a custom property of each object to the tooltip text and put that text into the field before displaying it. You not only have the advantage of all the custom appearance properties that fields support, you can also easily change the tooltip by updating the custom property at any time.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5402
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Tool tips

Post by richmond62 » Sat May 30, 2020 9:10 pm

Code: Select all

on mouseEnter
   set the text of fld "tipper" to the toolTip of me
   set the topLeft of fld "tipper" to the bottomRight of me
end mouseEnter

on mouseLeave
   set the topLeft of fld "tipper" to the bottomRight of this card
end mouseLeave
-
tttt.jpg
Attachments
Clootie 2.livecode.zip
Here's the stack.
(30.87 KiB) Downloaded 65 times

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5855
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Tool tips

Post by jacque » Sun May 31, 2020 4:21 am

That's the idea. I usually just show and hide the field though.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5402
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Tool tips

Post by richmond62 » Sun May 31, 2020 8:05 am

Set a custom property of each object to the tooltip text and put that text into the field before displaying it.
The custom property seemed an unnecessary step. 8)

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5402
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Tool tips

Post by richmond62 » Sun May 31, 2020 8:32 am

Ultimately my recipe is no good for several reasons:
-
YakAttack.jpg
-
1. Field gets chopped off by edge of stack.

2. Original tooltips show up as well.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5402
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Tool tips

Post by richmond62 » Sun May 31, 2020 8:49 am

This is a better bet:
-
CheeseBoard.jpg
-
Tooltips appear in a field in a substack.

Code: Select all

on mouseEnter
   set the text of fld "tipper" of stack "TopTips" to the toolTip of me
   put the bottomRight of me into BR
   set the topLeft of stack "TopTips" to BR
   set the vis of stack "TopTips" to true
end mouseEnter

on mouseLeave
   set the vis of stack "TopTips" to false
end mouseLeave
Although as there is a conflict between bottomRight of an object on a card
and topLeft of a palettised stack the tooltips do not appear in optimum locations (yet).
Attachments
Clootie 3.livecode.zip
Here's the stack.
(31.32 KiB) Downloaded 57 times

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5402
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Tool tips

Post by richmond62 » Sun May 31, 2020 8:51 am

HOWEVER this is NOT what the OP was speirin after.

What the OP would like is big tooltips in the IDE for her own work.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5402
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Tool tips

Post by richmond62 » Sun May 31, 2020 11:51 am

Reading the documentation re location is not very helpful:
The location of an object is any expression that evaluates to a point --two integers separated by a comma. The first item of the location is the distance in pixels from the left edge of the screen (for stacks) or card (for other objects) to the center of the object. The second item is the distance in pixels from the top edge of the screen (for stacks) or card (for other objects) to the center of the object.
For cards, the location property is read-only and cannot be set.
As I should like to get the location of an object on a card from the left edge of my monitor and from the top edge,
rather than its position relative to the card.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5402
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Tool tips

Post by richmond62 » Sun May 31, 2020 12:12 pm

Code: Select all

on mouseEnter
   set the text of fld "tipper" of stack "TopTips" to the toolTip of me
   put the bottomRight of me into BR
   put item 1 of the loc of this stack into SLR
   put item 2 of the loc of this stack into SUD
   put (the width of this stack)/2 into SL
   put (the height of this stack)/2 into SH
   put (SLR - SL) into LEDGE
   put (SUD - SH) into TEDGE
   put (LEDGE + (the right of me)) into RSIDE
   put (TEDGE + (the bottom of me)) into OBBUM
   set the topLeft of stack "TopTips" to (RSIDE, OBBUM)
   set the vis of stack "TopTips" to true
end mouseEnter

on mouseLeave
   set the vis of stack "TopTips" to false
end mouseLeave
-
AtLast.jpg
-

What a fiddle. 8)
Attachments
Clootie 4.livecode.zip
Here's the stack.
(31.48 KiB) Downloaded 56 times

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5402
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Tool tips

Post by richmond62 » Sun May 31, 2020 12:32 pm

Ouch: this is a load of old scroobly:
-
Cobblers.jpg
-
So:

Code: Select all

on mouseEnter
   if the toolTip of me is empty then
      -- do nix
   else
      set the text of fld "tipper" of stack "TopTips" to the toolTip of me
      put the bottomRight of me into BR
      put item 1 of the loc of this stack into SLR
      put item 2 of the loc of this stack into SUD
      put (the width of this stack)/2 into SL
      put (the height of this stack)/2 into SH
      put (SLR - SL) into LEDGE
      put (SUD - SH) into TEDGE
      put (LEDGE + (the right of me)) into RSIDE
      put (TEDGE + (the bottom of me)) into OBBUM
      set the topLeft of stack "TopTips" to (RSIDE, OBBUM)
      set the vis of stack "TopTips" to true
   end if
end mouseEnter

on mouseLeave
   set the vis of stack "TopTips" to false
end mouseLeave
Attachments
Clootie 5.livecode.zip
Will it never end?
(45.1 KiB) Downloaded 52 times

Post Reply

Return to “Off-Topic”