GadgetToolTip for TextGadget

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Marc56us
Addict
Addict
Posts: 1600
Joined: Sat Feb 08, 2014 3:26 pm

GadgetToolTip for TextGadget

Post by Marc56us »

:idea: Please add support GadgetToolTip for TextGadget (if possible)

:arrow: Goal: for example, add fast translation or help for a label or long text when space for text is too short.

Thanks.

:wink:
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: GadgetToolTip for TextGadget

Post by Dude »

A big +1 for this request. It's just a simple matter of adding the #SS_NOTIFY style to the TextGadget's creation:

Code: Select all

OpenWindow(0,200,200,200,50,"test",#PB_Window_SystemMenu)

tg=TextGadget(0,10,10,180,20,"Hover over me for a surprise!")
SetWindowLongPtr_(tg,#GWL_STYLE,GetWindowLongPtr_(tg,#GWL_STYLE)|#SS_NOTIFY)
GadgetToolTip(0,"Why, hello there, Mr Fancy Pants!")

Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: GadgetToolTip for TextGadget

Post by netmaestro »

It's just a simple matter of adding the #SS_NOTIFY style
Agreed, on Windows. But whether or not the team adds something often depends on what's involved in making it work on the other OS's, likely resulting in no feature if it can't be done on all 3 easily. I hope this one makes the cut as it would be a good thing.
BERESHEIT
Post Reply