Highlighted

UI mouseover tooltip

Contributor ,
Mar 02, 2017

Copy link to clipboard

Copied

Hey all,

Does anyone know of a way to have a mouseover tooltip in the UI?  Mainly, I have a set of IconButton's and instead of using text on the buttons, I'm using an image and want the user to be able to mouseover the button and get a description of what it does.  This is easily done for the web, but I didn't see anything in ScriptUI that allowed for it.  I looked into the helpTip property but that didn't seem to be it.

I haven't really thought about if it would be possible to add manually.  The biggest thing to overcome I would think would be creating a floating StaticText/Window/Group/something that you could hide/show when the mouse was over the button.  Anyone ever try something like that?

Thanks!

Calvin

Did you check your After Effect Preferences ?

After Effect > Preferences > General > Show Tool tips

The very first one

Screen Shot 2017-03-05 at 08.29.18.png

Ben

TOPICS
Scripting

Views

2.4K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

UI mouseover tooltip

Contributor ,
Mar 02, 2017

Copy link to clipboard

Copied

Hey all,

Does anyone know of a way to have a mouseover tooltip in the UI?  Mainly, I have a set of IconButton's and instead of using text on the buttons, I'm using an image and want the user to be able to mouseover the button and get a description of what it does.  This is easily done for the web, but I didn't see anything in ScriptUI that allowed for it.  I looked into the helpTip property but that didn't seem to be it.

I haven't really thought about if it would be possible to add manually.  The biggest thing to overcome I would think would be creating a floating StaticText/Window/Group/something that you could hide/show when the mouse was over the button.  Anyone ever try something like that?

Thanks!

Calvin

Did you check your After Effect Preferences ?

After Effect > Preferences > General > Show Tool tips

The very first one

Screen Shot 2017-03-05 at 08.29.18.png

Ben

TOPICS
Scripting

Views

2.4K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Mar 02, 2017 0
Advocate ,
Mar 03, 2017

Copy link to clipboard

Copied

cswaim080880  wrote

I looked into the helpTip property but that didn't seem to be it.

Normally, that's the one:

myButton.helpTip = "Please click me";

Xavier

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 03, 2017 0
Contributor ,
Mar 03, 2017

Copy link to clipboard

Copied

Yup, it's spec'd out in the Javascript Tools Guide as part of IconButton but I just can't seem to get it to work.  I've found a way to override onDraw for the IconButton and evaluate when the mouse is over but can't figure out how to popup a tooltip.

iconbutton.onDraw = function(drawState) {

     if(drawState.mouseOver) {

          //do mouse over stuff

     }

   

     this.graphics.drawImage(this.image, 0, 0);

}

I know in HTML/CSS you could use a <div> and explicitly set it's position to that of the mouse.  To my knowledge, this isn't possible and while I haven't tried this using a window...it's not exactly what I want so I'd like to avoid if at all possible.

My absolute backup is to have a StaticText in the UI that I can use as a console to display any messages from program to user.

Thoughts?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 03, 2017 0
Advocate ,
Mar 03, 2017

Copy link to clipboard

Copied

myControl.helpTip = "some piece of string" has always worked for me, regardless of the control type, the os, and the after effects version, and even when the control has a custom onDraw associated to it. Going the popup window route seems overkill, and definitely unncessary.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 03, 2017 0
Contributor ,
Mar 03, 2017

Copy link to clipboard

Copied

Welp, in 15+ years of software development, this isn't even close to the first time I've come across spec'd out functionality that doesn't work (for me at least).  It's probably some real small needs to be set or deleted or changed in my system to get this to work.

Here's the quick test I'm using:

var win = new Window("palette", "Test IconButton helpTip", undefined, {resizeable: true});

// resource specifications

var res = "group { \

     iconBtn: IconButton { text: 'test', preferredSize: [29.5, 29.5], helpTip: 'test helpTip', properties: { style: 'togglebutton', toggle: true } }, \

     }";

          

win.mainGrp = win.add(res);  

win.show();

This simply doesn't work on my system (see below):

Anyone at Adobe have any thoughts? 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 03, 2017 0
Enthusiast ,
Mar 03, 2017

Copy link to clipboard

Copied

Calvin, it looks like a bug.

I suggest you to fill a bug report here.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 03, 2017 0
Explorer ,
Mar 05, 2017

Copy link to clipboard

Copied

Did you check your After Effect Preferences ?

After Effect > Preferences > General > Show Tool tips

The very first one

Screen Shot 2017-03-05 at 08.29.18.png

Ben

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 05, 2017 0
Contributor ,
Mar 05, 2017

Copy link to clipboard

Copied

Welp, looks like I'm a big ol' dumb dumb.  That's EXACTLY it.  The silver lining is that it illuminates a use case I need to account for...when the user doesn't have "Show Tool Tips" set.

THANK YOU!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 05, 2017 0
Contributor ,
Mar 05, 2017

Copy link to clipboard

Copied

Does anyone know the name of the Preference to check for this one?  Scanned through all the files located in ~/Library/Preferences/Adobe/After Effects/<VERSION>/ and couldn't find one that jumped out at me. 

It's important for me to at least be able to check for this pref because my UI is going to be 99% button/icon based to avoid using text and save on screen real estate.

THANKS!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 05, 2017 0
Explorer ,
Mar 05, 2017

Copy link to clipboard

Copied

I found it here :

~/Library/Preferences/Adobe/After Effects/14.1/Adobe After Effects 14.1 Prefs-indep-general.txt

["Main Pref Section v2"]

     "Pref_TOOL_TIPS" = 01 // CHECKED

     "Pref_TOOL_TIPS" = 00 // UNCHECKED

Tested and working.

Ben

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 05, 2017 0
Contributor ,
Mar 05, 2017

Copy link to clipboard

Copied

Ok, one last thing...when I try to access that preference both via the settings object and the preferences object it does not appear to exist. 

app.preferences.getPrefAsBool("Main Pref Section v2", "Pref_TOOL_TIPS");

app.settings.getSetting("Main Pref Section v2", "Pref_TOOL_TIPS");

Since it's a preference that lives in a file outside the main prefs file with a section name shared across multiple files (Main Pref Section v2), is there a different way to access it?  I would assume all the files get consolidated into a single preference/settings object.  Maybe I'm missing something simple...

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 05, 2017 0
Explorer ,
Mar 05, 2017

Copy link to clipboard

Copied

It's a simple text file, so I guess you could just open the file, find the line with "Pref_TOOL_TIPS" = 00 and change it to 01.

then save the file.

It's documented in JavaScript Tools Guide CC , that you can open from Extendscript > Help menu.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 05, 2017 0
Contributor ,
Mar 05, 2017

Copy link to clipboard

Copied

Yeah, there's always a brute-force/hack way around everything but if there's a way to do it already provided within the app framework, it'll be easier and take less time.  If it comes down to it I'll do that but there's GOT to be a way to access that preference.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 05, 2017 0
Contributor ,
Mar 05, 2017

Copy link to clipboard

Copied

And I'm just looking to access what the value is...not change it.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 05, 2017 0
Explorer ,
Mar 05, 2017

Copy link to clipboard

Copied

Just found this : It supposed to have a third parameter since v.12 , as documented here :

scripting changes in After Effects CC (12.0-12.2) | Creative Cloud blog by Adobe

The third parameter for ourTool Tip is :

  • PREF_Type_MACHINE_INDEPENDENT

So it should be the following :

app.preferences.getPrefAsString("Main Pref Section v2", "Pref_TOOL_TIPS", PREFType.PREF_Type_MACHINE_INDEPENDENT);

Except it doesn't return any value. I tried other preferences in the same section(working on After Effect 2017 v14.1.0.57) and it works just fine. As you can see in Adobe After Effects 14.x Prefs-indep-general.txt , the value for some parameter like Pref_TOOL_TIPS is = 01.

Any parameter with 00 or 01 as values doesn't return anything when I try. Every other ones works just fine. Looks like another bug to me.

Ben

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 05, 2017 0
Advocate ,
Mar 06, 2017

Copy link to clipboard

Copied

This works for me:

app.preferences.getPrefAsBool("Main Pref Section v2", "Pref_TOOL_TIPS", PREFType.PREF_Type_MACHINE_INDEPENDENT);

Xavier

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 06, 2017 1
Explorer ,
Mar 06, 2017

Copy link to clipboard

Copied

Here you go !!

I was not aware of this getPrefAsBool .

Thank you Xavier.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 06, 2017 0
Contributor ,
Mar 06, 2017

Copy link to clipboard

Copied

BOOM!  Thanks all!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 06, 2017 0
Rusalke LATEST
New Here ,
Jul 02, 2020

Copy link to clipboard

Copied

Hi, By chance, could I see the results of what you did with the mouseover tooltip that reveals text? I am trying to do something similar.

 

Thank you,

R

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 02, 2020 0