Glenn_1,

When I searched the list for this, I found a number of questions, but no
answers. Someone already pointed out that 'Change' doesn't work (and I
confirmed that), so I started looking at the Tooltip package, but couldn't
make it work.

In any case, using the -tip option is easier. It creates a Tooltip object
internally, but I couldn't see how to get at the object. The kludge is in
passing the object handle (which I found by examining the $mw hash using
Data::Dumper) to 'UpdateTipText'. If someone can figure out how to access
that object in an OO manner, it would be cleaner (and safer).

Glenn_2

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Glenn
Linderman
Sent: Thursday, December 23, 2004 18:57
To: Glenn W Munroe
Cc: 'Glenn Linderman'; perl-win32-gui-users@lists.sourceforge.net
Subject: Re: [perl-win32-gui-users] Tooltips again

Glenn_2,

That looks nice.  Change (if it works) (per my previous, read the mail
sequentially and not yet awake enough to think of looking for more followups
first) would be simpler, but it is nice to  know there is a solution.

Glenn_1

On approximately 12/23/2004 4:47 AM, came the following characters from the
keyboard of Glenn W Munroe:

> Four hours later and I think I've got it. It's a bit of a kludge, but 
> it works. Click on the button to change the tip:
> 
> use Win32::GUI;
> 
> my $mw = new Win32::GUI::Window(
>       -name   => "mw",
>       -text   => "Tooltip Test",
>       -size   => [ 200, 100 ],
>       -pos    => [ 100, 100 ],
>       );
>               
> $mw->AddButton(
>       -name   => "btTest",
>       -text   => "Tooltip Test",
>       -size   => [ 80, 20 ],
>       -pos    => [ 40, 20 ],
>       -tip    => "Initial Tooltip",
>       );
> 
> $mw->Show();
> Win32::GUI::Dialog();
> 
> sub btTest_Click {
>       Win32::GUI::Tooltip::UpdateTipText($mw->{-tooltip},
>                                       $mw->btTest, "Updated Tooltip");
> }
> 
> 
> Glenn
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Glenn W Munroe
> Sent: Thursday, December 23, 2004 10:32
> To: 'Glenn Linderman'; perl-win32-gui-users@lists.sourceforge.net
> Subject: RE: [perl-win32-gui-users] Tooltips again
> 
> Glenn_1,
> 
> Yes, that works OK, but how do you change it once the program is running?
> 
> There is an entire package for this (Win32::GUI::Tooltip), but that is 
> what I can't get to work.
> 
> Glenn_2
> 
> -----Original Message-----
> From: Glenn Linderman [mailto:[EMAIL PROTECTED]
> Sent: Thursday, December 23, 2004 10:13
> To: Glenn W Munroe
> Subject: Re: [perl-win32-gui-users] Tooltips again
> 
> On approximately 12/22/2004 11:59 PM, came the following characters 
> from the keyboard of Glenn W Munroe:
> 
> 
>>Has anybody been able to get the Tooltip package to work? The only 
>>example I've found is in Johan's Loft examples, but it doesn't work on 
>>my system and I can't figure out the correct parameters to make it work.
>> 
>>Alternatively, has anybody been able to change the tooltip created 
>>with the -tip option to a control dynamically? This would appear to be 
>>a much easier route to the same goal if it is possible.
>> 
>>Glenn
> 
> 
> Not sure exactly what you are trying to do, or what isn't working.
> 
> I just add
> 
>       -tip => "tooltip text",
> 
> into my Buttons and such, and it just seems to work...
> 
> --
> Glenn -- http://nevcal.com/
> ===========================
> Having identified a vast realm of ignorance, Wolfram is saying that 
> much of this realm lies forever outside the light cone of human knowledge.
>                            -- Michael Swaine, Dr Dobbs Journal, Sept 
> 2002
> 
> 
> 
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide Read honest & candid 
> reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now. 
> http://productguide.itmanagersjournal.com/
> _______________________________________________
> Perl-Win32-GUI-Users mailing list
> Perl-Win32-GUI-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
> 
> 
> 
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide Read honest & candid 
> reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now. 
> http://productguide.itmanagersjournal.com/
> _______________________________________________
> Perl-Win32-GUI-Users mailing list
> Perl-Win32-GUI-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
> 
> 
> 

--
Glenn -- http://nevcal.com/
===========================
Having identified a vast realm of ignorance, Wolfram is saying that much of
this realm lies forever outside the light cone of human knowledge.
                           -- Michael Swaine, Dr Dobbs Journal, Sept 2002


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users


Reply via email to