[racket] Spreadsheet editor

From: dpavlov at ipa.nw.ru (dpavlov at ipa.nw.ru)
Date: Tue Sep 16 17:12:38 EDT 2014

Hello,

I have made a reusable version of my spreadsheet editor.
Its capabilities are limited to the needs of my app, so
not much:

- Fixed number of columns with arbitrary labels, which
   can be changed while running. The number of columns
   does not scale well: 1000 is OK, while 100 000 is not.
   The width of the column is adjusted dynamically so that
   the column label is visible and all the visible cells
   are not cut. Otherwise, column width is not changeable.

- Arbitrary number of rows with arbitrary labels.
   As many rows as you want. Rows can be added or removed
   while running.

- Clickable buttons for columns and rows with arbitrary
   callbacks.

- Editable (text-only, one-line) cells with arbitrary
   callbacks for displaying the cells or updating their
   contents.

- Scrolling bars (well, sliders), also arrow keys and
   PgUp/PgDn should work.


Here is the editor along with a demo:

https://github.com/kugelblitz/spreadsheet-editor


I see two issues currently:

* During editing, text snip creates a white plate that
   extends outside the supposed borders of the snip.
   See [1] for details.

* Racket GUI does not provide scroll bars that one can
   use independently from canvas or panel. I currently
   use sliders instead of scroll bars, but with slider,
   it is impossible to go up/down by exactly one point.
   Also, it is not possible to update the limits of the
   slider, so I have to re-create it when I add or remove
   a row from the table.

I would love to hear any comments regarding those issues,
or any other issues, or anything that draws your
attention in the source code.


[1] 
http://lists.racket-lang.org/users/archive/2014-September/064137.html

Posted on the users mailing list.