Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: PB 11.5 - Tooltip text at run-time

1,722 views
Skip to first unread message

jwayt

unread,
Sep 4, 2010, 11:56:11 AM9/4/10
to
In article <4c7ff14c.4aa...@sybase.com>, Russ says...
>
> 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

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.

Terry Voth [TeamSybase]

unread,
Sep 2, 2010, 3:04:39 PM9/2/10
to
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:
>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
=*=

Russ

unread,
Sep 2, 2010, 2:47:40 PM9/2/10
to

Russ

unread,
Sep 2, 2010, 4:49:50 PM9/2/10
to
I am confused.
You mean in dw in design time ? Yes, I can. But I need to be
able to generate tooltip text based on on some logic that
the app provides so I would like to do it on some object
event level.

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:

Terry Voth [TeamSybase]

unread,
Sep 2, 2010, 7:55:11 PM9/2/10
to
Yes, I'm suggesting something at design time, like based on the
content of a column (e.g. I have a hidden column that is exclusively
used for row-specific tooltip text).

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

Russ

unread,
Sep 2, 2010, 3:44:15 PM9/2/10
to
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.

Terry Voth [TeamSybase]

unread,
Sep 2, 2010, 3:58:13 PM9/2/10
to
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,

0 new messages