digitalmars.D.learn - Chris E. Miller ToolTip (D1)
Greetings. Trying to see if anyone can help with this one... Chris Miller wrote a wonderful set of libraries for Windows programming. One of the libraries was a ToolTip library that when called against an object, when the mouse hovered over that object, it will display the string that it was set for that sepcific object. Everything is working fine with the exception that I would like to break the string set to an specific object to multiple lines. For example, I have set that ToolTip to be, a=n (not approved) o=n (not outlooked) t>0 (total > 0) but, when I set it, and have tried multiple ways, they all display in one line, ie. a=n (not approved)o=n (not outlooked)t>0 (total > 0) The code I am using is, ttip = new ToolTip; ttip.setToolTip(this, "Testing..."); ttip.setToolTip(find, r" a=n (not approved invoices o=n (not outlooked projects/tasks " ); I have also tried to use \n and \r\n. Any other thoughts?
Nov 13 2013
On Wednesday, 13 November 2013 at 18:58:44 UTC, jicman wrote:Greetings. Trying to see if anyone can help with this one... Chris Miller wrote a wonderful set of libraries for Windows programming. One of the libraries was a ToolTip library that when called against an object, when the mouse hovered over that object, it will display the string that it was set for that sepcific object. Everything is working fine with the exception that I would like to break the string set to an specific object to multiple lines. For example, I have set that ToolTip to be, a=n (not approved) o=n (not outlooked) t>0 (total > 0) but, when I set it, and have tried multiple ways, they all display in one line, ie. a=n (not approved)o=n (not outlooked)t>0 (total > 0) The code I am using is, ttip = new ToolTip; ttip.setToolTip(this, "Testing..."); ttip.setToolTip(find, r" a=n (not approved invoices o=n (not outlooked projects/tasks " ); I have also tried to use \n and \r\n. Any other thoughts?Does anyone knows if this is even possible? Thanks. josé
Nov 14 2013
Not many D1 users are still here :( I personally, have zero idea what library are you even speaking about.
Nov 14 2013
On Thursday, 14 November 2013 at 14:38:49 UTC, Dicebot wrote:Not many D1 users are still here :( I personally, have zero idea what library are you even speaking about.I am talking about this library: http://www.dprogramming.com/dfl.php specifically, this object, http://wiki.dprogramming.com/DflDoc/Tooltip The idea is to have multiple lines in a hover-mouse like prompt. Ok, thanks for the reply. By the way, before D2, there was D1. We should always remember our ancestors. :-) josé
Nov 14 2013
You have to manually set the tooltip's max width to a fixed value using the tooltip handle and Win32 API, by doing this you're telling the tooltip object it is a multiline tooltip and from now on it will accept \r\n as end of line: ttip = new ToolTip; SendMessageA(ttip.handle, TTM_SETMAXTIPWIDTH, 0, 250); ttip.setToolTip(find, "a=n (not approved)\r\no=n (not outlooked)\r\nt>0 (total > 0)); That's it, it works (i tested it). By the way, the DFL version on Chris' site is for D1 but there's this version for D2 (i use both): https://github.com/Rayerd/dfl/tree/master/win32/dfl
Nov 14 2013
On Thursday, 14 November 2013 at 16:17:53 UTC, Heinz wrote:You have to manually set the tooltip's max width to a fixed value using the tooltip handle and Win32 API, by doing this you're telling the tooltip object it is a multiline tooltip and from now on it will accept \r\n as end of line: ttip = new ToolTip; SendMessageA(ttip.handle, TTM_SETMAXTIPWIDTH, 0, 250); ttip.setToolTip(find, "a=n (not approved)\r\no=n (not outlooked)\r\nt>0 (total > 0)); That's it, it works (i tested it). By the way, the DFL version on Chris' site is for D1 but there's this version for D2 (i use both): https://github.com/Rayerd/dfl/tree/master/win32/dflNow, dfl can use the dmd 2.065 you can see the fork : https://github.com/FrankLIKE/dfl fork(from https://github.com/Rayerd/dfl/) Waiting Miller commit it.
Apr 11 2014
will the library build for x64? On Friday, 11 April 2014 at 12:33:27 UTC, FrankLike wrote:On Thursday, 14 November 2013 at 16:17:53 UTC, Heinz wrote:You have to manually set the tooltip's max width to a fixed value using the tooltip handle and Win32 API, by doing this you're telling the tooltip object it is a multiline tooltip and from now on it will accept \r\n as end of line: ttip = new ToolTip; SendMessageA(ttip.handle, TTM_SETMAXTIPWIDTH, 0, 250); ttip.setToolTip(find, "a=n (not approved)\r\no=n (not outlooked)\r\nt>0 (total > 0)); That's it, it works (i tested it). By the way, the DFL version on Chris' site is for D1 but there's this version for D2 (i use both): https://github.com/Rayerd/dfl/tree/master/win32/dflNow, dfl can use the dmd 2.065 you can see the fork : https://github.com/FrankLIKE/dfl fork(from https://github.com/Rayerd/dfl/) Waiting Miller commit it.
Apr 12 2014
On Saturday, 12 April 2014 at 10:41:19 UTC, hicman wrote:will the library build for x64?It will build but not true x64.On Friday, 11 April 2014 at 12:33:27 UTC, FrankLike wrote:On Thursday, 14 November 2013 at 16:17:53 UTC, Heinz wrote:You have to manually set the tooltip's max width to a fixed value using the tooltip handle and Win32 API, by doing this you're telling the tooltip object it is a multiline tooltip and from now on it will accept \r\n as end of line: ttip = new ToolTip; SendMessageA(ttip.handle, TTM_SETMAXTIPWIDTH, 0, 250); ttip.setToolTip(find, "a=n (not approved)\r\no=n (not outlooked)\r\nt>0 (total > 0)); That's it, it works (i tested it). By the way, the DFL version on Chris' site is for D1 but there's this version for D2 (i use both): https://github.com/Rayerd/dfl/tree/master/win32/dflNow, dfl can use the dmd 2.065 you can see the fork : https://github.com/FrankLIKE/dfl fork(from https://github.com/Rayerd/dfl/) Waiting Miller commit it.
Apr 25 2014
On Thursday, 14 November 2013 at 16:17:53 UTC, Heinz wrote:You have to manually set the tooltip's max width to a fixed value using the tooltip handle and Win32 API, by doing this you're telling the tooltip object it is a multiline tooltip and from now on it will accept \r\n as end of line: ttip = new ToolTip; SendMessageA(ttip.handle, TTM_SETMAXTIPWIDTH, 0, 250); ttip.setToolTip(find, "a=n (not approved)\r\no=n (not outlooked)\r\nt>0 (total > 0)); That's it, it works (i tested it). By the way, the DFL version on Chris' site is for D1 but there's this version for D2 (i use both): https://github.com/Rayerd/dfl/tree/master/win32/dflSorry for my tardiness in respond, Heinz. And thanks for the help. By the way, for those out there that are not Windows friendly like me, :-), I used the following to make it work. SendMessageA(ttip.handle, 0x0400 + 24, 0, 250); Since I got Error: undefined identifier TTM_SETMAXTIPWIDTH when building the code. Thanks again, Heinz. josé
Apr 25 2014