Re: Show Tree widget row contents on hover?
On 4/23/21 2:33 PM, Keith Clarke via use-livecode wrote: Thanks Bob for the syntax for setting the widget’s tooltip. That’ll help once I have some sensible data appearing in the answer dialogue box that I can use in the tooltip. My key problem now is how to translate the comma-delimited path returned by the actionInspect function - pPath - of the form 'Key1,Key2,Key3' …to the correct syntax to have the array return the content of Key3. I think it's failing because concatenation isn't working with array syntax. Does this work better: answer aContent[item 1 of pPath][item 2 of pPath][item 3 of pPath] -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Show Tree widget row contents on hover?
Thanks Bob for the syntax for setting the widget’s tooltip. That’ll help once I have some sensible data appearing in the answer dialogue box that I can use in the tooltip. My key problem now is how to translate the comma-delimited path returned by the actionInspect function - pPath - of the form 'Key1,Key2,Key3' …to the correct syntax to have the array return the content of Key3. My code below converts pPath to LiveCode array key syntax, i.e. [Key1][Key2][Key3] ...and then concatenates this after aContent, the name of the array variable into which the widget’s arrayData has been extracted. As far as I can tell, this should resolve to... answer aContent[Key1][Key2][Key3] ...which should return the content of Key3 but I’m seeing '[Key1][Key2][Key3]’ in the answer dialogue box. Any clues? Best, Keith > On 23 Apr 2021, at 19:17, Bob Sneidar via use-livecode > wrote: > > Okay I see you are setting the tooltip. > > set the tooltip of widget "Tree View" to tDataA [1] > > or whatever the element is. > > Bob S > > >> On Apr 23, 2021, at 11:13 , Bob Sneidar via use-livecode >> wrote: >> >> Is this what you are looking for? >> >> on mouseUp >> put the arrayData of widget "Tree View" into tDataA >> put tDataA [1] into tValue1 >> put tDataA [2] into tValue2 >> -- etc... >> end mouseUp >> >> I am unsure of what you are trying to do. Are you trying to put the items of >> a list into a tree view widget? >> >> put the arrayData of widget "Tree View" into tDataA >> put item 1 of tList into tDataA [1] >> put item 2 of tList into tDataA [2] >> -- etc... >> set the arrayData of widget "Tree View" to tDataA >> >> you can do this in a loop of course. >> >> Bob S >> >> >>> On Apr 23, 2021, at 10:57 , Keith Clarke via use-livecode >>> wrote: >>> >>> 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 & "]" >>> >>> end actionInspect >>> >>> …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! :) >>> Best, >>> Keith >> >> ___ >> use-livecode mailing list >> use-livecode@lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription >> preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Show Tree widget row contents on hover?
Okay I see you are setting the tooltip. set the tooltip of widget "Tree View" to tDataA [1] or whatever the element is. Bob S > On Apr 23, 2021, at 11:13 , Bob Sneidar via use-livecode > wrote: > > Is this what you are looking for? > > on mouseUp > put the arrayData of widget "Tree View" into tDataA > put tDataA [1] into tValue1 > put tDataA [2] into tValue2 > -- etc... > end mouseUp > > I am unsure of what you are trying to do. Are you trying to put the items of > a list into a tree view widget? > > put the arrayData of widget "Tree View" into tDataA > put item 1 of tList into tDataA [1] > put item 2 of tList into tDataA [2] > -- etc... > set the arrayData of widget "Tree View" to tDataA > > you can do this in a loop of course. > > Bob S > > >> On Apr 23, 2021, at 10:57 , Keith Clarke via use-livecode >> wrote: >> >> 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 & "]" >> >> end actionInspect >> >> …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! :) >> Best, >> Keith > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Show Tree widget row contents on hover?
Is this what you are looking for? on mouseUp put the arrayData of widget "Tree View" into tDataA put tDataA [1] into tValue1 put tDataA [2] into tValue2 -- etc... end mouseUp I am unsure of what you are trying to do. Are you trying to put the items of a list into a tree view widget? put the arrayData of widget "Tree View" into tDataA put item 1 of tList into tDataA [1] put item 2 of tList into tDataA [2] -- etc... set the arrayData of widget "Tree View" to tDataA you can do this in a loop of course. Bob S > On Apr 23, 2021, at 10:57 , Keith Clarke via use-livecode > wrote: > > 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 & "]" > > end actionInspect > > …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! :) > Best, > Keith ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Show Tree widget row contents on hover?
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 & "]" end actionInspect …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! :) Best, Keith > On 23 Apr 2021, at 17:35, HENRY LOWE via use-livecode > wrote: > > Keith, > > 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. > > Henry > >> On Apr 23, 2021, at 9:10 AM, Keith Clarke via use-livecode >> 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. >> Keith >> >> >> >> ___ >> use-livecode mailing list >> use-livecode@lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription >> preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Show Tree widget row contents on hover?
Keith, 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. Henry > On Apr 23, 2021, at 9:10 AM, Keith Clarke via use-livecode > 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. > Keith > > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Show Tree widget row contents on hover?
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. Keith ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode