Page 1 of 1

Datagrids - Highlight one column cell?

Posted: Fri May 29, 2015 10:02 am
by Scoperzor
Hi all

I'm trying to figure out if it's possible to highlight only one column cell at a time in a datagrid, rather than the default entire row selection. I would like the user to be able to select a single cell from a 4x5 grid, and for that cell to be highlighted. Can this be done?

Thanks.

Re: Datagrids - Highlight one column cell?

Posted: Fri May 29, 2015 2:52 pm
by dunbarx
Datagrids. Well,

Code: Select all

send "editcell col 1,2" to grp 1
does not stick. Though it hilites the cell momentarily. Maybe there is a property that must be set?

And:

Code: Select all

select fld "col 1 0002"
selects a field, but that is sort of in edit mode, not run mode.

Klaus? Trevor?

Craig Newman

Re: Datagrids - Highlight one column cell?

Posted: Sat May 30, 2015 6:07 pm
by sritcp
The "hilite color" is a DG property that refers to the row; you cannot use it to highlight an individual cell.

You can, however, script the FillinData to set "the opaque" of the cell to true and "the bgColor" to your desired highlight color.
You can do this conditionally (for the correct row and column) so only the chosen cell is highlighted.

See
http://forums.livecode.com/viewtopic.ph ... 226#p62226
for the code and an example image.

Regards,
Sri