Show Tree widget row contents on hover?
keith.clarke at me.com
Fri Apr 23 13:57:10 EDT 2021
Thanks for responding Henry.
I did try that property when I found no hover capability on the Tree widget. I set the widget to read-only and scripted...
on actionInspect pPath
put the arrayData of widget "Tree" into aContent
replace comma with "][" in pPath
answer aContent & "[" & pPath & "]"
…however, like the highlightedElement property, this still returns the element’s key rather than its content, despite my feeble attempts at post-processing.
Hence the second part of my question which reveals my lack of array syntax knowledge! :)
> On 23 Apr 2021, at 17:35, HENRY LOWE via use-livecode <use-livecode at lists.runrev.com> wrote:
> Take a look at the widget’s ActionInspect message.
> The actionInspect message is sent to the widget's script object when the inspect icon is clicked on.
> The inspect icon appears when the value string of a particular array element contains a newline character,
> OR if it is too large to fit in the space provided. The pPath parameter contains the path to the element whose icon was clicked.
> Use the ActionInspect pPath message to get the array element and then use a contextual menu to display the truncated element (tElement):
> set the text of btn “TreeView_Contextual_Menu" to tElement
> popup button “TreeView_Contextual_Menu"
> This requires the user to click on the inspect icon of the truncated array element element to display the full element.
> I agree that it would be nice to do this with a hover.
>> On Apr 23, 2021, at 9:10 AM, Keith Clarke via use-livecode <use-livecode at lists.runrev.com> wrote:
>> Hi folks,
>> I’m experimenting with a tree widget and indentation means that row content gets truncated, so I’m wondering if there is any simple way to show the current row’s content in a tooltip on hover?
>> The dictionary doesn’t mention any mouse-related messages and the highlightedElement property returns a path as a comma-delimited list of array keys but not the row’s content.
>> Am I missing some LiveCode magic here that’s too obvious to document?
>> Thanks in advance.
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode