[Gambas-user] Listitem text as tootip

Che cheguebeara at ...626...
Sat Feb 2 20:11:50 CET 2008


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





More information about the User mailing list