Display All Tooltips?

Windows specific forum
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Display All Tooltips?

Post by IdeasVacuum »

Win 7, 8, 10

I would like to offer my Users a button to display all ToolTips at once (and un-display all tooltips!).

With the code below, it's possible to apply Win API to PB's GadgetToolTips:

Code: Select all

Procedure ShowAllTips()
;#-----------------------
Protected iTtip.i = FindWindow_("tooltips_class32", 0)

              If iTtip

                     SendMessage_(iTtip, #TTM_SETDELAYTIME, #TTDT_INITIAL, 0)
                     SendMessage_(iTtip, #TTM_SETDELAYTIME, #TTDT_AUTOPOP, 30000) ;30000 max
                     SendMessage_(iTtip, #TTM_SETTIPBKCOLOR,   $D1FFFF, 0)        ;BackColor
                     SendMessage_(iTtip, #TTM_SETTIPTEXTCOLOR, $0002FF, 0)        ;TextColor
              EndIf
EndProcedure
Setting the max tip display time is something I often do any way and the above code always works, but how about having a button that displays all tips at once?

Also (only of minor interest), the BackColor/FrontColor messages don't want to work (they did before didn't they?). I want to avoid the Balloon style tips because the rounded edges of the tips have no antialias.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
deeproot
Enthusiast
Enthusiast
Posts: 285
Joined: Thu Dec 17, 2009 12:00 pm
Location: Llangadog, Wales, UK
Contact:

Re: Display All Tooltips?

Post by deeproot »

That's an interesting idea. I also sometimes do delay adjustments to tooltips but unfortunately my API knowledge isn't up to making them all show at once.

Extending the thought - I would have a specific use for showing tooltips on multiple specific gadgets. For example when the mouse is over one StringGadget show its tip as normal but also showing the tips on a couple of other StringGadgets at the same time. Also maybe showing them by code alone rather than mouse over.
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Display All Tooltips?

Post by IdeasVacuum »

Yes, Javascript has at least one lib that is super-flexible with tooltips, making them really useful. I see the ability to switch tips on/off in code as a better alternative to a "ribbon bar", which takes up too much space and at the same time limits the text length. Some languages have very long words :D

It can be done "by hand", a tip would consist of an image gadget, a 32bit image (transparency) of the message box and 2D drawing text. If you were just trying to mimic the Microsoft tips, showing one tip at a time only, then hand made is good since you can shape it and colour it to suit, but if there has to be a large number of them some automation is required. Would be much easier to do if the CanvasGadget could be transparent.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Post Reply