My hoverIcon will not display

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

RCozens
Posts: 138
Joined: Thu Aug 05, 2021 6:42 am
Location: Manchester, CA USA

My hoverIcon will not display

Post by RCozens » Wed Apr 26, 2023 5:59 pm

Greetings All,

Per the LC Dictionary, the hoverIcon property "Specifies an image to display in a button when the mouse pointer enters the button."

Attached is a very simple stack: One button, two images, and no scripts.

When the mouse enters the button, the hoverIcon image is not displayed [Win 10, LC9.6.9].

What am I missing?

Rob
Attachments
Hover Test.zip
(2.84 KiB) Downloaded 66 times
Rob Cozens dba Serendipity Software Company
Manchester, CA USA

Each new generation gives more attention to the man-made world...
and less attention to the world that made man.

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: My hoverIcon will not display

Post by Klaus » Wed Apr 26, 2023 6:41 pm

Hi Rob,

doesn't work on my Mac, too!?
However a quick test with a new stack and some of the built-in icons DOES in fact work!?
Too funky... :shock:

Best

Klaus

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

Re: My hoverIcon will not display

Post by richmond62 » Wed Apr 26, 2023 6:48 pm

Whether my pointer is IN or OUT of the target I ALWAYS get this:
-
SShot 2023-04-26 at 20.43.51.png
SShot 2023-04-26 at 20.43.51.png (11.71 KiB) Viewed 4938 times
-
This helps me understand what you are expecting:
-
SShot 2023-04-26 at 20.45.24.png
-
"The hoverIcon is displayed when the mouse pointer is over the button, but the button is not hilited."

Um, I wonder if, for some reason best known unto someone, somewhere, if as soon as we mouseOver a
button it becomes hilited?

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

Re: My hoverIcon will not display

Post by richmond62 » Wed Apr 26, 2023 6:52 pm

OK, OK, I was talking crap [wouldn't be the first time!]:
-
SShot 2023-04-26 at 20.50.51.png
-
Just possibly, you're having a problem with GIF images!
-
SShot 2023-04-26 at 20.54.23.png
-
So, I'm going to play 'silly buggers' like this:
-
SShot 2023-04-26 at 20.56.44.png
SShot 2023-04-26 at 20.56.44.png (54.17 KiB) Viewed 4937 times

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

Re: My hoverIcon will not display

Post by richmond62 » Wed Apr 26, 2023 7:05 pm

Now, let's see what a tweak or 2 does:
-
SShot 2023-04-26 at 21.01.08.png
SShot 2023-04-26 at 21.01.08.png (13.44 KiB) Viewed 4935 times
-
Nothing whatsoever.

This does NOT work even for built-in icons"
-
SShot 2023-04-26 at 21.04.31.png
SShot 2023-04-26 at 21.04.31.png (49.97 KiB) Viewed 4935 times
Last edited by richmond62 on Wed Apr 26, 2023 9:07 pm, edited 1 time in total.

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

Re: My hoverIcon will not display

Post by richmond62 » Wed Apr 26, 2023 7:08 pm

This has NOT been working for quite some time:
-
SShot 2023-04-26 at 21.07.51.png
-
As LC is chock full of bugs and 'work around' is now a bone stuck in almost every developer's throat, wouldn't
it be a good idea to STOP development of everything and KILL all those bugs completely?

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1209
Joined: Thu Apr 11, 2013 11:27 am

Re: My hoverIcon will not display

Post by LCMark » Wed Apr 26, 2023 7:32 pm

RCozens wrote:
Wed Apr 26, 2023 5:59 pm
When the mouse enters the button, the hoverIcon image is not displayed [Win 10, LC9.6.9].

What am I missing?
So the autoArm property of that button has been set to true - which is why there is no hoverIcon displaying.

Can you remember how you created it? Or indeed how that property got set?

[ FWIW, the autoArm property enables very specific and quite subtle behavior which is used for the buttons the engine creates to implement menus on Windows and Linux ]

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

Re: My hoverIcon will not display

Post by richmond62 » Wed Apr 26, 2023 7:43 pm

Well, I don't know about the OP, but I am most definitely missing something as I cannot for the
life of me work out where I would find the autoArm prop. in the props palette.

Although what you state is, inevitably, correct:
-
SShot 2023-04-26 at 21.43.02.png
SShot 2023-04-26 at 21.43.02.png (65.27 KiB) Viewed 4911 times
-
and I did learn that autoArm is set to false by default:
-
SShot 2023-04-26 at 21.46.26.png
-
and that the OP's problem can be sorted out very quickly:
-
SShot 2023-04-26 at 21.48.32.png
SShot 2023-04-26 at 21.48.32.png (54.41 KiB) Viewed 4906 times
-
Can you remember how you created it? Or indeed how that property got set?
That is extremely queer.

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1209
Joined: Thu Apr 11, 2013 11:27 am

Re: My hoverIcon will not display

Post by LCMark » Wed Apr 26, 2023 7:54 pm

richmond62 wrote:
Wed Apr 26, 2023 7:43 pm
Well, I don't know about the OP, but I am most definitely missing something as I cannot for the
life of me work out where I would find the autoArm prop. in the props palette.
Indeed - that's why I'm curious as to how a button ended up with it being set to true.

The property has never been exposed as a property in the property inspector because it causes buttons to have very specific and subtle behavior - tuned for the purposes of the engine using it to build the menus you see on Linux and Windows (and on macOS too - when you have the native theme turned off).

I'm sure there are a few who have employed its rather arcane properties to good use outwith that - however, for most of us, it is something best left well alone :)

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: My hoverIcon will not display

Post by Klaus » Wed Apr 26, 2023 8:06 pm

Hm, in my above metioned test I created a stack, dragged a button from the tools palette,
set the two icons for icon and hovericon and it worked right out of the box.

I did not set any properties for the button!?
Attachments
hovertest_km.livecode.zip
(623 Bytes) Downloaded 56 times

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

Re: My hoverIcon will not display

Post by richmond62 » Wed Apr 26, 2023 8:21 pm

I did not set any properties for the button!?
Read the previous postings.

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: My hoverIcon will not display

Post by Klaus » Wed Apr 26, 2023 8:24 pm

Ah, sorry, missed Mark's first answer...

RCozens
Posts: 138
Joined: Thu Aug 05, 2021 6:42 am
Location: Manchester, CA USA

Re: My hoverIcon will not display

Post by RCozens » Thu Apr 27, 2023 1:03 am

LCMark wrote:
Wed Apr 26, 2023 7:32 pm
So the autoArm property of that button has been set to true - which is why there is no hoverIcon displaying.
You're the man, Mark!

The button was copied from a HyperCard stack that was converted to LC (actually RunRev at the time) many years ago. Then when I researched this problem I confused the autoArm property with the autoHilite property which I had already found not to help.

I will be eternally grateful for your finding my error. I had just changed all the buttons in my app to use the hoverIcon instead of the armedIcon based on guidance from the LC Dictionary. Now I won't have to change them back....just reset that property.

Many thanks,...and thanks to all who responded.

Rob
Rob Cozens dba Serendipity Software Company
Manchester, CA USA

Each new generation gives more attention to the man-made world...
and less attention to the world that made man.

RCozens
Posts: 138
Joined: Thu Aug 05, 2021 6:42 am
Location: Manchester, CA USA

Re: My hoverIcon will not display

Post by RCozens » Thu Apr 27, 2023 1:36 am

RCozens wrote:
Thu Apr 27, 2023 1:03 am
I had just changed all the buttons in my app to use the hoverIcon instead of the armedIcon based on guidance from the LC Dictionary. Now I won't have to change them back....just reset that property.
Woe is me!

This worked fine in the example stack I uploaded; but after resetting the autoArm property of all my buttons they still won't display the hoverIcon on mouseEnter. Is it possible that there is something else about my stack's HyperCard heritage that is blocking this? I just looked at the lists of stack & button properties, but nothing jumps out as the possible culprit.

Rob
Rob Cozens dba Serendipity Software Company
Manchester, CA USA

Each new generation gives more attention to the man-made world...
and less attention to the world that made man.

RCozens
Posts: 138
Joined: Thu Aug 05, 2021 6:42 am
Location: Manchester, CA USA

Re: My hoverIcon will not display

Post by RCozens » Thu Apr 27, 2023 1:54 am

A little further info:

Now that the buttons' autoArm property is false, the hoverIcons are being displayed on mouseUp.

??
Rob Cozens dba Serendipity Software Company
Manchester, CA USA

Each new generation gives more attention to the man-made world...
and less attention to the world that made man.

Post Reply

Return to “Talking LiveCode”