ToolTipEx - custom fonts and colors in ToolTips

Post your working scripts, libraries and tools
just me
Posts: 5396
Joined: 02 Oct 2013, 08:51
Location: Germany

ToolTipEx - custom fonts and colors in ToolTips

23 Aug 2014, 04:18

There are several scripts in the old forum for the customizing of ToolTips. Nonetheless, here is another one. It's a proof of concept based on the original AHK code in Script2.cpp. I converted the code to AHK (hopefully correct) to show that the additional featureds could be implemented easily.

Update on 2014-08-30:
  • Fixed bug preventing multiline ToolTips.

Update on 2014-08-27:
  • Added support for icons.
  • Added named function parameters.

FYI:

Code: [Select all] [Expand] [Download] (ToolTipEx.ahk)GeSHi © Codebox Plus

Code: [Select all] [Expand] [Download] (ToolTipEx_sample.ahk)GeSHi © Codebox Plus



For reference:

Code: [Select all] [Expand] [Download] (Script2.cpp)GeSHi © Codebox Plus

Last edited by just me on 30 Aug 2014, 04:14, edited 2 times in total.
zcooler
Posts: 435
Joined: 11 Jan 2014, 04:59

Re: ToolTipEx - custom fonts and colors in ToolTips

23 Aug 2014, 06:45

Hi just me!

This is very cool :D

I have a shell extension installed which displays dynamic data for certain media file types (.TS) on the tooltip in windows explorer. It would be awesome to be abled to make those quite boring looking tooltips nicer (which seems easy to do with this function). It would also be cool to exchange tooltip property labels, which in some cases doesn't describe the dynamic data that well.

My tooltip looks like this translated from Swedish:
Objecttype: TS-file
Size: 1,50 GB
Length: 01:07.57
Texting: S19E10 - “Castle Hill”
Stationname: Discovery Channel

I would like to exchange:
Objecttype: --> Container format:
Length: --> Duration:
Texting: --> Episode:
Stationname: --> Channel:

Is that possible with this function and if so how?

Regards
zcooler
just me
Posts: 5396
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: ToolTipEx - custom fonts and colors in ToolTips

23 Aug 2014, 07:14

As far as I understand you want to change the tooltips of another application? The function cannot do that.
zcooler
Posts: 435
Joined: 11 Jan 2014, 04:59

Re: ToolTipEx - custom fonts and colors in ToolTips

23 Aug 2014, 07:27

Yes, I was hoping to be abled to customize the win explorer tooltips. Ok, so no other application...thanks for this info! I have been contemplating how to modify the property labels for years. The shell extension properties seems to be made for Radio more than TV.

Best regards
zcooler
User avatar
joedf
Posts: 6278
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada, Quebec
Contact:

Re: ToolTipEx - custom fonts and colors in ToolTips

23 Aug 2014, 10:44

Just me, you never cease to amaze... A really cool feature to add would be images ;)
just me
Posts: 5396
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: ToolTipEx - custom fonts and colors in ToolTips

24 Aug 2014, 04:52

Joedf, ToolTips only support icons (within the title, but the title text won't be drawn using the specified font's size), 16 * 16 on Win XP and also 32 * 32 on Vista+. Do you want them?
User avatar
joedf
Posts: 6278
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada, Quebec
Contact:

Re: ToolTipEx - custom fonts and colors in ToolTips

24 Aug 2014, 07:29

Hmm ... Didn't know about icons... But I have seen images in tooltips before.., must be some sort of custom "drawing" or something... I imagine you could add the icon support, if it's not too much trouble and if it is worth it.
guest3456
Posts: 2313
Joined: 09 Oct 2013, 10:31

Re: ToolTipEx - custom fonts and colors in ToolTips

24 Aug 2014, 11:01

HotKeyIt's tooltip library supports icons

just me:
What advantage is there to using the dynamic parameters list Params* as opposed to the normal list with default values? Because there is a pretty large disadvantage in that the comments need to be attached to the function in order to understand how to use it. whereas often people just look at the function definition line

just me
Posts: 5396
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: ToolTipEx - custom fonts and colors in ToolTips

26 Aug 2014, 21:12

joedf:
Icons are supported now.

guest3456:
Parameters are named now.
User avatar
joedf
Posts: 6278
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada, Quebec
Contact:

Re: ToolTipEx - custom fonts and colors in ToolTips

26 Aug 2014, 21:32

Awesome :D!
guest3456
Posts: 2313
Joined: 09 Oct 2013, 10:31

Re: ToolTipEx - custom fonts and colors in ToolTips

26 Aug 2014, 22:23

just me wrote:guest3456:
Parameters are named now.


I wasn't necessarily suggesting that. I was just curious as to your reasoning behind it. I was hoping to learn something

just me
Posts: 5396
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: ToolTipEx - custom fonts and colors in ToolTips

27 Aug 2014, 03:23

There was no special reason besides it seemed to be more convenient for me during development and testing.
slur
Posts: 10
Joined: 13 Jun 2014, 07:05

Re: ToolTipEx - custom fonts and colors in ToolTips

29 Aug 2014, 13:21

May I ask how to display new line(`n) or carriage return(`r) in the text?
just me
Posts: 5396
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: ToolTipEx - custom fonts and colors in ToolTips

29 Aug 2014, 15:54

The same way as you would do it when using the ToolTip command.
slur
Posts: 10
Joined: 13 Jun 2014, 07:05

Re: ToolTipEx - custom fonts and colors in ToolTips

29 Aug 2014, 22:01

Then maybe it's on my side :crazy:
I get Image with this code.
ToolTipEx("Hello`r`nWorld!")

WindowsXP SP3 AHK_L 1.1.15.03
just me
Posts: 5396
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: ToolTipEx - custom fonts and colors in ToolTips

30 Aug 2014, 04:15

No, it was on my side. I only tested with an 'iconed' tooltip. :headwall: Sorry!

Should work now!
Skrell
Posts: 163
Joined: 23 Jan 2014, 12:05

Re: ToolTipEx - custom fonts and colors in ToolTips

01 Oct 2014, 08:23

zcooler wrote:Hi just me!

This is very cool :D

I have a shell extension installed which displays dynamic data for certain media file types (.TS) on the tooltip in windows explorer.
Regards
zcooler

Just curious which shell extension is it ?
Skrell
Posts: 163
Joined: 23 Jan 2014, 12:05

Re: ToolTipEx - custom fonts and colors in ToolTips

01 Oct 2014, 08:29

just me wrote:As far as I understand you want to change the tooltips of another application? The function cannot do that.

So the purpose of this script is NOT to replace the boring windows drawn tooltips correct? Only for displaying your own tooltips under conditions of your choosing?

Return to “Scripts and Functions”

Who is online

Users browsing this forum: No registered users and 7 guests