Tooltips for Columns

Wouldn't it be nice to have tooltips for columns in the file display?

They could show e.g. the column's name, the equivalent parameter for SetAttr (if available), and for script columns the (yet to be defined) .infotip property.

Alternatively (if a tooltip gets too much in the way), this info could be displayed in an info circle like the blue one in the lower right part that shows some format information.

4 Likes

You could add Clipboard SET %headerkey% to the Column Header context menu as a quick way to get a column's keyword.

Could also put the keyword into the menu itself (see the Remove item for an example; replace %headername% with %headerkey%), but some of them are quite long.

And add this as the description...

="Name: "+%headername%+"\nKeyword: "+%headerkey%

2023-11-24_164138

2 Likes

You may have noticed that...
="Name: "+%headername%+"\nKeyword: "+%headerkey%
Will output an error when hovering the menu item from the context menus tab in customize mode.

Corrected to not output an error.
=IsSet(headername, headerkey)?"Name: "+headername+"\nKeyword: "+headerkey:"N/A"

3 Likes

Is there maybe a trick where you can use Evaluator to set a global "ColumnA_Tooltip" variable in the code and then you could use that global variable as an argument to the tooltip of this extra context menu item? Or are these global vars only available if the previous caller sets them?

I don't think you can set global variables with Evaluator. Yes, the global var would need to be set beforehand.

The evaluator can use global variables:

Ok, so this indeed works if you set up an Evaluator global var column_copy_kw beforehand
=IsSet(headername, headerkey) ? "Name: "+headername +"\n"+ "Keyword: "+headerkey + $glob:column_copy_kw : ""

But then how to set up $glob:column_copy_kw? Is it possible form the Jscript registering columns to run some code that would invoke Evaluator and execute $glob:column_copy_kw = "my.info.toolitp"? Or maybe get some Evaluator object and change its glob property by adding an extra var there?

You could also change the label itself so that you kind of have a tooltip that works not on hover, but on right click on the header (e.g., add it to the first line)

@eval:={lbl = (IsSet(headerkey) ? "Copy key: " + headerkey : "");};
@label:=return lbl;
Clipboard SET %headerkey%

I would also like to see this as a standard Description field for Evaluator Columns without going through the Global variable route.