(selectable) Label/Grid/Viewport/ScrolledWindow manner, but it did not
work so well:

i should add for completeness that once i made the label selectable,
responsiveness of a 104x104 grid-matrix was bogged down to utter
uselessness.

On 2016-06-17 06:50, Mike Wey wrote:

You probably want a ListView?

An example that also does some custom rendering:
https://github.com/gtkd-developers/GtkD/blob/master/demos/gtkD/DemoMultiCellRenderer/DemoMultiCellRenderer.d

you mean a ListStore/TreeView combination?

well i was hoping i could avoid the extra complexity of a full blown
data/view model. being forced to, i gave it a try now:

  • good news, it does not crash on large data sets, i tried up to 256x256
    matrices alright

  • even better news, memory consumption is very reasonable, much lower
    than for the grid approach

  • however, performance is completely unacceptable. it takes more than 3
    seconds to prepare a 256x256 matrix in ListStore/TreeView and more than
    17 seconds for a 512x512. about 10% of the time goes to filling the
    ListStore, while 90% is taken for building a TreeView from the model.
    also, it hardly makes a difference if in debug or release mode or if the
    GC is disabled during the ListStore/TreeView construction.

  • not that it matters for my current use case but out of curiosity: how
    can the TreeView be configured to not highlight a row? i would want to
    select individual cells, never rows or columns.

so it really seems to be the worst case scenario: i'll have to roll my
own (lightweight) spreadsheet. as in figuring out how many rows/columns
fit in the current widget space, arrange them (probably as grid of
selectable labels), manage my own scrollbars, manually change the data
on display in response to the scroll position...just to display a simple
data matrix. this sucks big time :(