Is it possible to set a different tooltip if a button is disabled?
TIA
kmartin7
Professional Software Development Tools
Is it possible to set a different tooltip if a button is disabled?
TIA
kmartin7
Not directly, but while the button is disabled, you might enable a hot spot above it, with the tool tip you want.
Great idea Jim. You do have to plan how you reenable your button (click on the hotspot..which "erases" it or using another trigger).
Another way to achieve this would be using Flash instead of buttons in AMS.
Yossi
That is clever...
Corey Milner
Creative Director, Indigo Rose Software
Corey,
Don't you EVER sleep???
Yossi
I like it. Thanks!
Np
![]()
Actually, I cannot get this to work. I disable the hotspot in the properties dialog, then enable it if a certain state is true. But irregardles of whether the stata is true or false, I still get the hotspot's tooltip, and not the button's tooltip.
--Hotspot.SetEnabled("Hotspot1", false);
registry_value = Registry.GetValue(HKEY_CURRENT_USER, "Software\\DocSoft Quick.SVG Autorun", "Registered", true);
Audio.SetVolume(CHANNEL_ALL, 100);
if (registry_value == "EnableBtns") then
--Audio.Stop(CHANNEL_EFFECTS);
Button.SetEnabled("adobe", true);
Button.SetEnabled("install", true);
Button.SetEnabled("documentation", true);
Button.SetEnabled("website", true);
end
adobe_installed = Folder.DoesExist(_SystemFolder.."\\Adobe");
--adobe_installed = Folder.DoesExist(_SystemFolder.."\\Adobe\SVG Viewer 3.0");
if adobe_installed then
Hotspot.SetEnabled("Hotspot1", true);
Button.SetEnabled("adobe", false);
end
Also, I need some help with detecting a specific subfolder in the _SystemFolder. I can detect \\Adobe, but cannot detect \\Adobe\SVG Viewer 3.0. Any ideas?
Kurt
Hmm, another workaround - use two exact buttons (one with a tooltip; one without) and use the setVisible properties to toggle back and forth. A little more work, but it should give you the result you're expecting.
As for your System Folder, change -
(_SystemFolder.."\\Adobe\SVG Viewer 3.0");
to
(_SystemFolder.."\\Adobe\\SVG Viewer 3.0");
Can't forget the double-slashes
HTH
Kurt,
I think it was discussed in a previous post. There is a ..bug..(yes, even in AMS, it happens) that has a disabled object still reacting to the mouse and the tooltip problem you described is the result.
If you would use two button objects one on top of the other, each one with a different tooltip and using the visible property and not the enabled one, you would get what you need.
Attached is a sample project for that.
As to the paths, you have to double slash your directories: adobe\\SVG.
Good luck
Yossi
I guess my post above is invisible? I pretty much suggested the same thing![]()
No, not at all. What happens and I believe we all do it sooner or later (I know I have a few times, sorry), is that we read the first post or two or three and do not see our idea being put forth and so then we post our comment(s).Originally Posted by rhosk
So, in light of such, two points awarded rhosk team! (grin)
Sincerely,
Intrigued
kmartin7, are you aware that starting a line of code with two dashes comments the line of code out?
In your example code above, three different lines of code are not processed because you have commented them out.
--Hotspot.SetEnabled("Hotspot1", false);
--Audio.Stop(CHANNEL_EFFECTS);
--adobe_installed = Folder.DoesExist(_SystemFolder.."\\Adobe\SVG Viewer 3.0");
Eh, he was probably in the middle of troubleshooting. The tooltips do perform erratically. Probably system-atic.Originally Posted by JimS
I realize this. It was only rhetorical in nature actuallySo, in light of such, two points awarded rhosk team! (grin)
I think our (Mr. Yossi and I) workaround should do the trick for what he desires. I've had to use it with the Windows Buttons plugin as well.
PS,...Intrigued!! You sure do [grin] a lot. Is this hereditary, a nervous tick or are you just a happy guy? I think we need a smiley especially for you (with a mere grin). Just an observance (grin).
Ah!Originally Posted by rhosk
As far as the (grin), that's something I just started with. It was easy and got the point across. But, to ask me to stop would be like telling McDonalds not to show the Arches (if one wants to take it to that extreme). (smirk). Which brings me to others I have used and you should not discount the usefulness of them so quickly as well:
(frown)
(smirk)
(wink)
But, to show that I can put a happy face on, here is my first, drum roll, smilie insertion.
Sincerely,
Intrigued