[Gambas-user] Listitem text as tootip

MaxVK maximvonk at ...626...
Tue Feb 19 21:05:23 CET 2008


Thanks Che, but that requires me to click on the list before the tooltip
works. I wanted to be able to pick up the mouse position (Maybe) and do what
you have done, but without needed the click.

Regards

Max


Che-5 wrote:
> 
> Not sure if this is what you are looking for but... it worked on my
> GB2...
> 
> PUBLIC SUB ListBox1_MouseMove()
> 
>   listbox1.tooltip = listbox1.Text
> 
> END
> 
> Clicking on an item to highlight it changed the tooltip to whatever was
> selected in the listbox...
> 
> Mark
> 
> 
> On Sat, 2008-02-02 at 17:45 +0100, Stefano Palmeri wrote:
>> Alle 00:14, sabato 2 febbraio 2008, MaxVK ha scritto:
>> > Hi there.
>> >
>> > (Many) years ago as a VB developer I used code that converted the text
>> of
>> > the listbox item under the mouse into the tooltip for the listbox
>> itself,
>> > making it easier to read items that are too long for the width of the
>> > listbox. I know that Gambas lists can scroll horizontally, allowing you
>> to
>> > view those items, but Id still like to implement the tooltip as well.
>> >
>> > Is there any way to do this in Gambas2 (2.0.0)
>> >
>> > Thanks
>> >
>> > Max
>> 
>> I don't think you can do it with listbox (unless you make
>> some magic with mouse position). But I'm not sure.
>> 
>> Use the ListView control instead, which automagically does 
>> what you're asking. Example attached.
>> 
>> Stefano
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________ Gambas-user mailing list
>> Gambas-user at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 
> 

-- 
View this message in context: http://www.nabble.com/Listitem-text-as-tootip-tp15234877p15562624.html
Sent from the gambas-user mailing list archive at Nabble.com.





More information about the User mailing list