On 06/15/2016 02:46 PM, captaindet wrote:

hi,

i need to provide a view into a data matrix, i.e. (mostly square) arrays
of integer values, at least up to 512x512. the values should be
copyable, i don't think i need them editable ATM.

so i don't need a fancy spreadsheet widget (which i would not mind
having though). i tried displaying my data in a
(selectable) Label/Grid/Viewport/ScrolledWindow manner, but it did not
work so well:

  • i can do 104x104 (looks fine just as i want it), but 128x128 crashes

the program without error message on myWindow.showAll

  • it takes almost 1 second to prepare the grid of labels (104x104)

  • the memory consumption is horrendous, about 5KB per cell (i.e. Label

in Grid in this case): so even if it would run, a 512x512 matrix would
take up > 1GB - clearly not acceptable.

so i am wondering if there is a better way?

and if there is a chance gtk.extra http://gtkextra.sourceforge.net/cms/
could be wrapped and distributed with GtkD? it seems to provide a
spreadsheet widget. i have no clue about the copyright stuff though.

thanks,

det

ps: i am on windows, using GtkD-3.3.0, DMD-2.068.2 32bit, gtk3.18.3

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