Tooltips in the Datagrid

Bob Sneidar bobsneidar at iotecdigital.com
Fri Nov 10 18:24:04 EST 2017


I don't use fillInData. This works with a normally populated datagrid, otherwise I could have done that. The trick here is discerning what the LAST control being pointed at is, after a nominal delay, and then ignoring all the mouseEnter events that were queued up before that. Otherwise (especially in Windows) EVERY SINGLE CONTROL TOUCHED gets a 30 tick delay followed by the display of a tooltip, and that gets tediously old in a hurry. 

Bob S


> On Nov 10, 2017, at 15:18 , Mark Wieder via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> On 11/10/2017 01:54 PM, Bob Sneidar via use-livecode wrote:
>> Hi all.
>> A while back I had a go at setting the tooltip when pointing at a datagrid element, but ran into some difficulties when scrolling. With Trevor Devore's assistance, I came up with a reliable way to do this. Enjoy.
> 
> Hmm... that looks like a lot of work.
> Here's what I do:
> 
> When you're passing the data array to FillInData, have one of the elements be the desired tooltip. Pick that out of the array, and set the tooltip of the datagrid element to the data. In PowerTools this looks like (in the row behavior script)
> 
> command FillInData pDataArray
>   local tWidgetName, tDisplayName
> ...
>   lock screen
>   repeat with tWidgetNum=1 to ColumnCount()
> ...
>     if pDataArray["Tooltip" & tWidgetNum] is not empty then
>        set the tooltip of image tWidgetNum of me to pDataArray ["Tooltip" & tWidgetNum]
> 
> 
> -- 
> Mark Wieder
> ahsoftware at gmail.com





More information about the use-livecode mailing list