Can I show a tooltip for datagrid cells?

Peter Haworth pete at lcsql.com
Sun Apr 7 22:01:26 EDT 2013


Roger,
Somewhere I have some code that does what you want with tooltips, I just
have to find it!  There is a dgColumnTooltip[columnname] property of a
datagrid so you can set it for a particular column.  For dynamic content
like yours, you have to figure out which line/column the mouse is over -
that's the code I'm trying to find for you.  I think it involved a
mouseMove handler that checked if it was over the datagrid and figured out
which dg line and column it was over.

Nothing wrong with datagrids, they're just very powerful controls with lots
of options so it takes a while to learn how to use them. I've converted
almost all my stacks to use tables rather than datagrids.  There are a
couple where the datagrid has features that I can't emulate in a table but
they are few and far between.

There's a couple of versatile table-like controls going the rounds right
now - rGrid from tapir software and Bernd Niggermann's modTablefield.
 Worth taking a look at.

Pete
lcSQL Software <http://www.lcsql.com>


On Sun, Apr 7, 2013 at 5:48 PM, Roger Eller <roger.e.eller at sealedair.com>wrote:

> Thank you Craig. I have just put the finishing touches on a new
> application which uses two simple datagrids.  For all their pretty
> alternating row color allure, they sure are a pain to work with.
>
> ~Roger
>
>
> On Sun, Apr 7, 2013 at 6:05 PM, <dunbarx at aol.com> wrote:
>
> > Roger.
> >
> >
> > Sure you can, but datagrids are complex.
> >
> >
> > You can "set the toolTip of field "col 1 0001" to "whatever"
> >
> >
> > and the tip will appear when you hover over the first field of the first
> > column. This is the default name schema of fields in datagrids, and those
> > names can be changed.
> >
> >
> > But when editing, a separate "phantom" field is created on the fly at the
> > rect of the field to be edited, and this will hamper the tip from
> showing,
> > because the phantom overlies it, so the tooltip will not be invoked.
> >
> >
> > All this is manageable, I guess, The name of the editing field is
> > "dataGridFieldEditor", and you could have that field's toolTip reflect
> the
> > underlying field.
> >
> >
> > Craig Newman
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list