1. John Vanleeuwe
  2. PowerBuilder
  3. Thursday, 24 October 2024 16:52 PM UTC

Hi guys,

 

We have an inputscreen with about 100 inputfields.

My goal is to have a database driven tooltip functionality.

I can create a global function that has inputarguments for example : the column name and the language of the user

How can i call my global function for each column name please without having to manually enter each datawindow column name in the Tooltip expression please ? I want to use a generic solution.

 

TIA

John

 

 

 
Who is viewing this page
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 24 October 2024 18:08 PM UTC
  2. PowerBuilder
  3. # 1

Hi John;

FYI ...

  1. You can use the following command to get a list of all objects in any DWO ... <DW Control Name>.Describe ("DataWindow.Objects")
  2. Then you can use this command to determine each DWO's type... <DW Control Name>.Describe ("<Columnname>.Type")
  3. Once you have identified the list of "Column" objects from step #2, you can then feed these into your function.
  4. Then you fnction could update the ToolTip text .. <DW Control Name>.Modify ("<Columnname>.Tooltip.Tip='<string>'")
  5. Then it could also update the Title ... <DW Control Name>.Modify ("<Columnname>.Tooltip.Title='<string>'")

Note: To also update the expression for the above, you would also add "~tIF(x,y,z)" to the Modify command string. 

HTH

Regards .. Chris

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 24 October 2024 18:58 PM UTC
Hi John .. I have updated my original answer. Does this now seem a better / clearer answer?
  1. Helpful 1
  1. John Vanleeuwe
  2. Thursday, 24 October 2024 19:31 PM UTC
HI Chris, this seems so "heavy" to me :) Does your solution/answer also means a "no" to my question, if we can refer to the column itself from within an expression ? Cause that makes more sense to me , but maybe it just can't be done :)
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 24 October 2024 20:58 PM UTC
Absolutely, the IF (X,Y,Z) would be the expression you would have entered in the DW Painter. So if it works there, it will work when dynamically added.

For example ...

String ls_mod = ls_colName

ls_mod += " .Tooltip.Title='" + "Default>"

ls_mod += "~tIF ( " + "<Columnname>" + "expression" + "," + "Tile A," + "Title B" )

<DW Control Name>.Modify ("<Columnname>.Tooltip.Title=' + ls_mod + "'")
  1. Helpful
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.