I converted all my column.Tag microhelp strings to tooltips in my
constructor if the column didn't have its own tooltip text.
I have also set the tooltip text expression to the contents of another
invisible column to reveal a description info in a layout that didn't
have room for it. It varies by row. Hover over a column to see it
interpreted in row context.
Within powerscript:
//expressions allow dynamic content. "~t" introduces expressions.
String ls_tipexpression1 = '~t~~~"Today is ~~~"+string(today())'
String ls_tipexpression2 = '~tmycolumn2_description' //another column
string ls_tip = "Hello, world." //static string
dw_1.Modify("mycolumn.tooltip.tip='" +ls_tip+ &
"' mycolumn.tooltip.enabled='1'")
Note that tooltip is a property of almost any control on the datawindow:
buttons, text, lines, rectangles, etc., and all of its attributes can
have expressions.
pbm_mousemove event is completely unnecessary.
FWIW, I've had success manipulating tooltip.enabled, so it's within the realm of
possibility. However, I do mine on constructor, based on user preferences.
Let us know,
Terry and Sequel the techno-kitten
On 2 Sep 2010 11:47:40 -0700,
in sybase.public.powerbuilder.general
<Russ> wrote:
>Hi All,
>
>I am using PB 11.5.1 build 4788
>Not able to change or set a text at run-time - tooltip does
>not popup at all.
>Placed script on pbm_mousemove event. Tooltip.Enabled = YES.
>
>Any idea ?
>
>Thanks
*********************************
Build your vocabulary while feeding the hungry
http://www.freerice.com
*********************************
Newsgroup User Manual
=====================
TeamSybase <> Sybase employee
Forums = Peer-to-peer
Forums <> Communication with Sybase
IsNull (AnswerTo (Posting)) can return TRUE
Forums.Moderated = TRUE, so behave or be deleted
*********************************
Sequel's Sandbox: http://www.techno-kitten.com
Home of PBL Peeper, a free PowerBuilder Developer's Toolkit.
Version 4.0.4 now available at the Sandbox
PB Futures updated June 25/2008
See the PB Troubleshooting & Migration Guides at the Sandbox
^ ^
o o
=*=
Thanks
> Any chance you can make the tooltip.text an expression
> within the DataWindow? Then you don't need to code
> anything in events. I've done that successfully too.
>
> Good luck,
>
> Terry and Sequel the techno-kitten
>
> On 2 Sep 2010 12:44:15 -0700,
> in sybase.public.powerbuilder.general
> <Russ> wrote:
> >You are close to what I would like to do: dynamically
> change >the text in tooltip bubble based on a value under
> the mouse >in dw...
> >
> >Thanks
> >
> >> pbm_mousemove seems like a problematic time to do this.
> >> Are you trying to make the tooltip appear on that event
> , >> or just enabling controls to tooltip when hovered
> over on >> that event? Maybe a little background on what
> you're after >> would help.
> >>
> >> FWIW, I've had success manipulating tooltip.enabled, so
> >> it's within the realm of possibility. However, I do
> mine >> on constructor, based on user preferences.
> >>
> >> Let us know,
> >>
> >> Terry and Sequel the techno-kitten
> >>
> >> On 2 Sep 2010 11:47:40 -0700,
> >> in sybase.public.powerbuilder.general
> >> <Russ> wrote:
I guess I'm picturing mousemove to be a bad time to be modifying
tooltip information. I don't have any inside information on exactly
how things operate, but it's not hard for me to imagine that some
tooltip logic is already in play, and trying to manipulate the data
that controls it at that point could be unproductive or
counterproductive.
The alternative would be to use WinAPIs to control your own tooltips;
that way you won't be stepping on Sybase's toes while they try to run
their logic. I've seen several instances of PB coding examples for
tooltips, so a Google search will probably get you half way there.
Good luck,
Terry and Sequel the techno-kitten
Thanks
> pbm_mousemove seems like a problematic time to do this.
Good luck,
Terry and Sequel the techno-kitten
On 2 Sep 2010 12:44:15 -0700,