1. Vlad V.
  2. PowerBuilder
  3. Wednesday, 30 May 2018 14:29 PM UTC

Hi, I have a very tiny yet very annoying problem. I'm sure I'm doing something wrong as the behaviour is identical when working on (grid) datawindows between PB 11.5 and PB 2017 R2

I am setting up several Tooltips on a few fields on the datawindow, however no matter what properties I set for their Text Color and Background Color, those colours at run-time are always the same: 

As it can be seen from the screenshot above, I am setting the Text Color property to anything - "Link Hover", "Red", I even click on the little customise-"equals" button next to it and I put in a boolean condition if(1=1, RGB(255,0,0), RGB(255,0,0)) to make sure that PB always takes red. Nothing. No matter how I try it, at runtime, tooltip's background is always of grey-yellow-ish default (that "Tooltip default background Color", 134217752, is).

I tried adding these lines of code to the window's open event to see if I can catch what is being passed:
ls_data = dw_browser.Describe("fieldname.Tooltip.Backcolor")
dw_browser.Object.fieldname.Tooltip.Backcolor = "Yellow" (or RGB(255,255,0) )

First line returns correctly what was the background colour set to anyway. Explicit re-setting in second line makes no difference.

I even tried changing the DW at the source level. To start with, we have default values in the line for that field are
... tooltip.backcolor="134217752" ... tooltip.textcolor="0"... 
OK, so I manually change that to
... tooltip.backcolor="65535" ... tooltip.textcolor="255"... 
Ran it - the same.

I notice the property 
tooltip.transparency="1"
Even though I can't find this property from the interface, just for a laugh I change it to 0 rather than 1 - no change.

But this is curious. I go (via PB) to datawindow and Tooltip properties, I set the Text Color manually to "Red", and I add condition if(1=1, "Red", "Red"), and I do the same for Background Color, only if(1=1, "Yellow", "Yellow"),  it makes no difference at the runtime, but in the DW source:
... tooltip.backcolor="65535~tif(1=1, ~"Yellow~", ~"Yellow~")" ... tooltip.textcolor="255~tif(1=1, ~"Red~", ~"Red~")"... tooltip.transparency="1~tif(1=1, ~"Yellow~", ~"Yellow~")"... 

What the heck is this tooltip.transparency and why is it taking the condition of Background Color property?


Anyway, I'm probably doing or not seeing something incredibly simple and stupid - I'd appreciate if anyone can draw it on the blackboard for me.


Cheers


 

Vlad V. Accepted Answer Pending Moderation
  1. Friday, 11 December 2020 09:00 AM UTC
  2. PowerBuilder
  3. # 1
0
Votes
Undo

Greetings, Vlad - 

If you're unsatisfied with the native PB tooltip, you can create/use your own:

http://pbsite.milente.nl/pbtip015.html

Granted, it's more work than simply setting a few properties in a painter, but it might be a viable solution for you (you'll have to make that determination). However, it's an option.

Good luck!

John

 

Hi John,

Thanks very much, this looks very nifty. I'll check it out for sure, though I still hope that Appeon will do something about it. It really seems like a very minor issue.

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Wednesday, 9 December 2020 16:39 PM UTC
  2. PowerBuilder
  3. # 2
1
Votes
Undo

Greetings, Vlad - 

If you're unsatisfied with the native PB tooltip, you can create/use your own:

http://pbsite.milente.nl/pbtip015.html

Granted, it's more work than simply setting a few properties in a painter, but it might be a viable solution for you (you'll have to make that determination). However, it's an option.

Good luck!

John

Comment
Hi John ... that is a great suggestion as it also allows your PB Apps to have ToolTips on controls where PB currently does *not* support them (ie CB, SLE, MLE, ST, etc)
  1. Chris Pollach @Appeon
  2. Thursday, 10 December 2020 18:48 PM UTC
There are no comments made yet.
Kai Zhao @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 9 December 2020 07:50 AM UTC
  2. PowerBuilder
  3. # 3
0
Votes
Undo

Hi Vlad,

As Brad Mettee mentioned, the Windows changing was the reason, you can follow the steps below to make it work.

1 Go to PB IDE -> your project, and check off the Project build option 'Windows classic style'(as shown as attached).
2 Build application.

Regards,
ZhaoKai

Attachments (1)
Comment
Hi Vlad,



We don't have a feasible workaround for this currently. I will record it as a new enhancement/requirement request and will transfer it to our product team for consideration.



Regards,

ZhaoKai

  1. Kai Zhao @Appeon
  2. Thursday, 10 December 2020 02:07 AM UTC
Hi Zhao Kai,



I appreciate you letting me know, but I haev to say it's completely disappointing and disheartening that such a small issue that seems really easy to fix would take 18 months for someone to look at, and after all that time just to say that you will transfer it to the product team. Seeing that the issue is absolutely minor and visual, and that it cannot possibly have stability implications to other areas of the system, could you at least try to make it a higher priority?



Thanks
  1. Vlad V.
  2. Friday, 11 December 2020 09:03 AM UTC
Hi Vlad,



Sorry for the inconvenience caused. We will analyze this issue as a priority. I will let you know once we make any progress.



Regards,

ZhaoKai

  1. Kai Zhao @Appeon
  2. Monday, 14 December 2020 01:41 AM UTC
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 30 May 2018 15:10 PM UTC
  2. PowerBuilder
  3. # 4
0
Votes
Undo

Hi Vlad;

  I just tested this in PB207R2 and the ToolTip TextColor and Background Color property settings do not work.

Please open a support ticket on this issue.

Note: I tested this feature all the way back to PB 11.5 and it does not work in any PB version. I do seem to recall this working at some point. I wonder if the issue is the newer O/S's like W10?

Regards ... Chris

Comment
Chris I believe you may be onto something when you said it could be about newer OS's. We have an installation of the application on our client's PC, Windows Server 2008 R2, and on that it works.



I believe we had it also working waaay back few years ago. It's somewhat likely that it was working on Windows XP, but not on Windows 7 / 8 / 10?



Does anyone have a XP VM handy to give it a shot?

 



Rgds,

Vlad

  1. Vlad V.
  2. Thursday, 31 May 2018 10:08 AM UTC
Whoever it was that said Windows changing was the reason, was correct.



From Microsoft website:



TTM_SETTIPBKCOLOR message (set background color of tooltip)



https://msdn.microsoft.com/en-us/library/windows/desktop/bb760411(v=vs.85).aspx



"When visual styles are enabled, this message has no effect."



Themes/Visual Styles reference page



https://msdn.microsoft.com/en-us/library/windows/desktop/hh270423(v=vs.85).aspx



 



Hope this helps

  1. Brad Mettee
  2. Thursday, 31 May 2018 13:15 PM UTC
Thanks for that Info Brad! 

  1. Chris Pollach @Appeon
  2. Thursday, 31 May 2018 13:26 PM UTC
There are no comments made yet.
Michael Kramer Accepted Answer Pending Moderation
  1. Wednesday, 30 May 2018 14:48 PM UTC
  2. PowerBuilder
  3. # 5
0
Votes
Undo

Hi Vlad,

You need to use numeric values for colors since the color/backcolor properties are numeric. The names (red, yellow, etc.) are purely for ease-of-reading in the IDE.

 

Comment
Hi Michael, 



Thanks for the shout, but I tried the numeric values as well - not just strings red, yellow, but also RGB coding and powerbuilder color number codes, no change. But Chris just replied, he recreated the issue. Seems to be a confirmed bug.

 

  1. Vlad V.
  2. Wednesday, 30 May 2018 17:37 PM UTC
Hello,

i've same problem. Any news?
  1. Martin Heigl
  2. Tuesday, 8 December 2020 08:30 AM UTC
Hi Martin,



Not a lot of news, though check out all messages from 9/12/2020, John gave us a useful tip.
  1. Vlad V.
  2. Friday, 11 December 2020 09:00 AM UTC
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.