DataGrid question: Suggestions for further enhancements

R.H. roland.huettmann at gmail.com
Thu Apr 2 07:06:04 EDT 2020


@Bernd Niggemann

The ModTableField is a great tool when the DG datagrid is an overkill. It
works very well for me. Thank you very much for the contribution, dear
Bernd.

+ Selecting columns:

What I added was the possibility to also select columns (hilite columns)
which is done using an overlay graphic rect that automatically is adjusting
to the height of the and width of the column in the table field and sits on
top with a certain transparency. Well, of course, it also is a workaround
only and requires some scripting if users should be able to also edit cells
- mpt as easy as it sounds first. To select more than one column would then
require more than just one overlay rectangles.

Here it requires using some additional space for a selection handler on top
of each column since the current behaviour is to sort columns with
mouseDown/Up on column headers. Therefore, I would go by most standards
which is clicking on a column header selects the column, and there is an
additional icon to allow for sorting. The sorting type depends on the
content (column formats).

+ Dragging and dropping columns and rows

It would also be possible to move columns dragging and dropping them with
visual feedback. Here the known technique is in taking a screen shot of the
row or column, letting it attach to the mouse while moving, and creating an
insertion line for a column or row passing over rows/columns allowing users
to drop the selection wherever desired in the table field. To also allow
this in scrolling fields (letting the field scroll moving the mouse towards
the edges of the table field) requires quite some scripting.

+ Freezing rows and/or columns:

The other enhancement, as discussed here before, is to "freeze" 1..n
columns or rows. To my mind, this can only be done using separate fields
attached to the left or top of the table field. Again, such fields must
change size depending on the size of the basic table fields and they must
update quickly with changes and be in synchrony with the main table field.

+ Icons / images

Also nicely shown in the ModTableField. It is possible using SVG graphics
turned into an image to be used as the image source of a chracter? I think
it is, but never tried it yet.

+ Field display formats

Then there is a need to most developers setting the format of rows or
columns or individual cell to either text, date/time format, number format,
percentage, custom format and whatever. It would be a nice add-on to have
this available as a "standard" instead of each developer scripting his own.
I actually did this, but of course not in such a general way that it would
be using locales, support all international format and usable to everyone.

(I personally think that it should be a property of fields in general to
allow to set it's display format for text, date, time, number, etc. It
would be really great if there is a "display format" and a raw data storage
automatically -- no need for custom properties in such case. Since LC is
supporting the Android version of Filemaker, that is the property of fields
in Filemaker anyway.)

So, almost we end up scripting a data grid based on the table field....)
Thanks to all contributions.

Enjoy ... Roland



More information about the use-livecode mailing list