Datagrid tooltips

Mark Wieder mwieder at ahsoftware.net
Thu Dec 8 22:37:29 EST 2011


Pete-

Thursday, December 8, 2011, 11:43:37 AM, you wrote:

> I know the datagrid has a dgTooltip property that displays when the user
> hovers over a column header but has anyone come up with a way to have a
> tooltip unique to each row?

> For example, let's say I have a column that uses the datagrid truncateTail
> function so the data in the column is abbreviated with "..." at the end.
>  I'd like to have a way to show the user the complete data in the
> row/column by hovering over it and displaying a tooltip.

Here's how I do this in PowerTools: I've got a datagrid that contains
thumbnail images, each of which may have a tooltip attached. When I'm
setting up the array for the datagrid I do:

put the tooltip of control id tWidgetGroup of stack tStackFile into tArray["ToolTip" & tImageNum]

then in the behavior script of the datagrid in FillInData:

if pDataArray["Tooltip" & tWidgetNum] is not empty then
  set the tooltip of image tWidgetNum of me to pDataArray["Tooltip" & tWidgetNum]
end if

so you could do the same with the text field instead of an image.

-- 
-Mark Wieder
 mwieder at ahsoftware.net





More information about the use-livecode mailing list