[plt-scheme] Re: Make a grid / table control in GUI

From: Stephen De Gabrielle (stephen.degabrielle at acm.org)
Date: Wed Sep 9 02:45:54 EDT 2009

Hi Praimon,

I have considered composing it by putting multiple editors(or
listboxes) side by side, but then I can't have oversize snips(I
probably don't need them), but I can use the GUI Application Framework
library to do the resizing.

Despite that advantage, I'd like to keep working on a subclassed
editor canvas-because I like the idea of getting to spreadsheet widget
eventually. How far did you get with implementing the resizing

Like similar widgets in other toolkits I've looked at I'm working on
spliting model and view funcionality into different classes:
data-grid-model% and data-grid-view%

Thanks for your feedback,


On Wednesday, September 9, 2009, praimon <praimon at gmail.com> wrote:
> Maybe you need editor-canvases side by side as the columns (list boxes
> don't work
> cause they're not seamless). The main difficulty is the resizing. When
> I originally
> worked on this, I thought it shouldn't be too hard, but it must be
> very hard because
> no one else has done it. I guess when the pointer gets between two canvases, the
> resizing icon appears, and then ... In my version, there were
> resizeable buttons atop
> each column that, when clicked, sorted the table according to that column.
> btw, your data-grid widget is great. I'll definitely be using it in
> the near future.
> regards,
> praimon
> On Tue, Sep 8, 2009 at 1:09 PM, Stephen De
> Gabrielle<spdegabrielle at gmail.com> wrote:
>> How would you implement that?
>> Another  iteration
>> #lang scheme/gui
>> (define grid-pasteboard%
>>   (class pasteboard%
>>     (init-field w h)
>>     (define/override (insert snip r c) (super insert snip (* c w) (* r h)))
>>     (super-new)))
>> ;; accepts data-grid (list of columns)
>> (define data-grid-pasteboard%
>> ...


Stephen De Gabrielle
stephen.degabrielle at acm.org
Telephone +44 (0)20 85670911
Mobile        +44 (0)79 85189045

Posted on the users mailing list.