Multiline GadgetTooltip

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Franky
Enthusiast
Enthusiast
Posts: 213
Joined: Sat Apr 26, 2003 2:58 pm

Multiline GadgetTooltip

Post by Franky »

Don´t know, if it is a bug or if this thread would better be placed under "Wishlist"

It isn´t possible to create a multiline Gadgettooltip with GadgetToolTip()

In the German Forum there is a thread about that and I thought it should be posted here

Here the link to this thread http://www.robsite.de/php/pureboard/vie ... c547dec739
Give Up everything but trying!
User avatar
Falko
Enthusiast
Enthusiast
Posts: 271
Joined: Sat Oct 04, 2003 12:57 pm
Location: Germany
Contact:

Re: Multiline GadgetTooltip

Post by Falko »

cool and very old :(.

But my desire is to these Multiline or another, which create multiple lines with "# CRLF $" is in
a GadgetToolTip.

Regards, Falko
www.falko-pure.de
Win11 Pro 64-Bit, PB_6.11b1
User avatar
Kukulkan
Addict
Addict
Posts: 1396
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Re: Multiline GadgetTooltip

Post by Kukulkan »

I would like to see this, too. Best would be HTML tooltips, but linebreaks would be great, too.

Kukulkan
ozzie
Enthusiast
Enthusiast
Posts: 443
Joined: Sun Apr 06, 2008 12:54 pm
Location: Brisbane, Qld, Australia
Contact:

Re: Multiline GadgetTooltip

Post by ozzie »

I don't know what was in that original thread mentioned by Franky as that link jut gives a 404. However, I use code based in info supplied by RASHAD in this topic: Increase display time of tooltip?. Although my query was about increasing the display time, the solution offered also supports multi-line tooltips. However, afaik it is not possible to specifically nominate where line breaks occur, but I find this solution to be ideal for my requirements, so hopefully this will be of use for you as well.

The code I have implemented is this:

Code: Select all

Procedure setToolTipControls()
  Protected ttip
  
  ttip = FindWindow_("tooltips_class32",0)
  If ttip
    SendMessage_(ttip,#TTM_SETMAXTIPWIDTH,0,500)  ; maximum width set to 500 pixels
    SendMessage_(ttip,#TTM_SETDELAYTIME,#TTDT_INITIAL,0)  ; cause tooltip to be displayed immediately
    SendMessage_(ttip,#TTM_SETDELAYTIME,#TTDT_AUTOPOP,30000)  ; time (in ms) tooltip will remain visible
  EndIf
  
EndProcedure
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Multiline GadgetTooltip

Post by IdeasVacuum »

You could DIY. Use a border-less Window containing an Editor, Canvas or WebGadget.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: Multiline GadgetTooltip

Post by davido »

IdeasVacuum wrote:You could DIY. Use a border-less Window containing an Editor, Canvas or WebGadget.
Nice idea, I hadn't thought of that. Will give it a try. :D
Presumably I could use the same window for many 'Tooltips', by just changing the text and moving the window around.
DE AA EB
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Multiline GadgetTooltip

Post by IdeasVacuum »

...yes - another good thing is that you can have images/illustrations in your DIY Tooltip, making the tip do more for your User.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
Falko
Enthusiast
Enthusiast
Posts: 271
Joined: Sat Oct 04, 2003 12:57 pm
Location: Germany
Contact:

Re: Multiline GadgetTooltip

Post by Falko »

@ozzie , very, very good. Thank you for a better Purebasic tooltip-Control :idea:
www.falko-pure.de
Win11 Pro 64-Bit, PB_6.11b1
Post Reply