clickability in a DataGrid

Peter Haworth pete at lcsql.com
Tue Jan 22 18:42:03 CST 2013


Hi Sieg,
I can't think of a way to detect a click in a specific cell of a datagrid.

If nobody else can come up with something, a couple of alternatives would
be to customize your Edit and Delete columns to contain buttons and put
your delete/edit commands in the mouseUp handler for each button, or
implement a right click popup menu with delete/edit options on it and put
the logic in the menuPick handler for the popup.

Would take too much space to describe how to do those things, but check out
the datagrid manual for details.

Pete
lcSQL Software <http://www.lcsql.com>


On Tue, Jan 22, 2013 at 4:09 PM, Sieg Lindstrom <sl at trackandfieldnews.com>wrote:

> I've used LiveCode/RunRev for some time but an new to using DataGrids.
>
> What I'd like to do (for Mac/Windows users) is include a DataGrid
> configured as, say, four columns of data followed by two columns that are
> the same in each row: one that reads "Delete" and one that reads "Edit."
> I'd like to set it up so that if the user clicks on "Delete" or "Edit" in a
> given row that then triggers handlers to either delete that row or edit the
> data contained in the other four columns of that row of the grid.
>
> Using a standard text field with tab-delimited data in each row, I'd use
> the ClickText and the ClickLine in the field script to determine what the
> user clicked and trigger the appropriate actions. How would one achieve
> this in a DataGrid?
>
> Thanks in advance!
>
> Sieg Lindstrom
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


More information about the use-livecode mailing list