I have come upon a tutorial which mentions using the dgHilitedLines property to find out which line in a Data Grid is selected but it does not make it clear where you might put this script to detect it (Data Grids seem to have so many elements to them : substacks and the custom control with nearly 9000 lines of script attached) Would it simply be a mouseup call on this custom control item that represents the Data Grid on your card? Aren't there already lots more mousup calls in that script already?
I basically want to have a media player object on my card update to play the video media associated with a particular line in the Data Grid when that line is selected. Each line in the Datagrid will represent a single video clip and information about it, including a thumbnail and full path to the media file. When any line is selected I want the player object to capture that selection and then load in the associated media file for that line in the Data Grid. It would be great as well if when multiple lines are selected it would display each clicked on clip as selections are made - updating to the latest addition to the selection each time.
I hope you can provide some explanations of the principles and logic behind how this is achieved along the way too.
Many thanks,
Quentin.
Detecting a selection being made on a Data Grid.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 14
- Joined: Wed Apr 17, 2013 11:15 pm
Detecting a selection being made on a Data Grid.
Last edited by Quentin Brown on Tue Sep 03, 2013 11:12 pm, edited 1 time in total.
Re: Detecting a selection being made on a Data Grid.
Stack with different examples to do that :
http://forums.runrev.com/viewtopic.php? ... 540#p78299
(a script in the grid, a script outside the grid)
http://forums.runrev.com/viewtopic.php? ... 540#p78299
(a script in the grid, a script outside the grid)