[Possible bug?] GadgetToolTip - add newlines support for it

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Korolev Michael
Enthusiast
Enthusiast
Posts: 199
Joined: Wed Feb 01, 2012 5:30 pm
Location: Russian Federation

[Possible bug?] GadgetToolTip - add newlines support for it

Post by Korolev Michael »

Code: Select all

OpenWindow(0,0,0,200,100,"test",#PB_Window_ScreenCentered|#PB_Window_SystemMenu)
ButtonGadget(0,10,10,80,25,"test")
GadgetToolTip(0,~"test tip\nNewline")

Repeat
Until WaitWindowEvent(50)=#PB_Event_CloseWindow
I get only one line :(
#CRLF$ solution doesn't work too.
Last edited by Korolev Michael on Fri Jan 22, 2016 7:47 pm, edited 1 time in total.
Former user of pirated PB.
Now registered user :].
User avatar
RSBasic
Moderator
Moderator
Posts: 1218
Joined: Thu Dec 31, 2009 11:05 pm
Location: Gernsbach (Germany)
Contact:

Re: GadgetToolTip - add newlines support for it

Post by RSBasic »

Image
Image
User avatar
Danilo
Addict
Addict
Posts: 3037
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: GadgetToolTip - add newlines support for it

Post by Danilo »

The 'alternative' is only for Windows OS.
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: GadgetToolTip - add newlines support for it

Post by IdeasVacuum »

It's easy enough to cook your own using a hidden gadget or window.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3870
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: GadgetToolTip - add newlines support for it

Post by wilbert »

Korolev Michael wrote:

Code: Select all

OpenWindow(0,0,0,200,100,"test",#PB_Window_ScreenCentered|#PB_Window_SystemMenu)
ButtonGadget(0,10,10,80,25,"test")
GadgetToolTip(0,~"test tip\nNewline")

Repeat
Until WaitWindowEvent(50)=#PB_Event_CloseWindow
Seems to work fine on OSX.
It shows a multiline tooltip.
Windows (x64)
Raspberry Pi OS (Arm64)
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: GadgetToolTip - add newlines support for it

Post by IdeasVacuum »

IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Little John
Addict
Addict
Posts: 4527
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: GadgetToolTip - add newlines support for it

Post by Little John »

+1 for built-in "newline" support in tooltips on all platforms where PB is running
User avatar
Kukulkan
Addict
Addict
Posts: 1352
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Re: GadgetToolTip - add newlines support for it

Post by Kukulkan »

+1 for tooltips with built-in "newline" support on all platforms
Korolev Michael
Enthusiast
Enthusiast
Posts: 199
Joined: Wed Feb 01, 2012 5:30 pm
Location: Russian Federation

Re: GadgetToolTip - add newlines support for it

Post by Korolev Michael »

Seems to work fine on OSX.
If it works on OSX, may it be possible bug?
Former user of pirated PB.
Now registered user :].
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: [Possible bug?] GadgetToolTip - add newlines support for

Post by ts-soft »

+1 for tooltips with built-in "newline" support on all platforms!
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
Shardik
Addict
Addict
Posts: 1991
Joined: Thu Apr 21, 2005 2:38 pm
Location: Germany

Re: [Possible bug?] GadgetToolTip - add newlines support for

Post by Shardik »

Korolev Michael wrote:

Code: Select all

OpenWindow(0,0,0,200,100,"test",#PB_Window_ScreenCentered|#PB_Window_SystemMenu)
ButtonGadget(0,10,10,80,25,"test")
GadgetToolTip(0,~"test tip\nNewline")

Repeat
Until WaitWindowEvent(50)=#PB_Event_CloseWindow
The newline support in tooltips only doesn't work in Windows. Michael Korolev's example is already working fine on Linux (tested on Ubuntu 14.04 x64 with KDE and PB 5.41 x64) and MacOS X (tested on OS X 10.6.8 (Snow Leopard) with PB 5.41 x86).

So +1 for a Windows implementation in PB... :wink:

Some further links to multiline tooltip workarounds for Windows:
- Display multiline tooltip using maximum tip width (netmaestro)
- Display multiline tooltip using #CR$ (Shardik, extending an example from netmaestro)
- Display multiline tooltip using maximum tip width or #CRLF$ (inSANE)
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2071
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: [Possible bug?] GadgetToolTip - add newlines support for

Post by Andre »

ts-soft wrote:+1 for tooltips with built-in "newline" support on all platforms!
+1

(especially as "only" a native PB solution for Windows is still needed, while Linux/MacOS are already working)
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
Fredi
Enthusiast
Enthusiast
Posts: 143
Joined: Wed Jul 23, 2008 10:45 pm

Re: [Possible bug?] GadgetToolTip - add newlines support for

Post by Fredi »

+1
mestnyi
Addict
Addict
Posts: 1001
Joined: Mon Nov 25, 2013 6:41 am

Re: [Possible bug?] GadgetToolTip - add newlines support for

Post by mestnyi »

+1
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: [Possible bug?] GadgetToolTip - add newlines support for

Post by davido »

+1
DE AA EB
Post Reply