[plt-scheme] MrEd - Gui

From: Laurent (Ouaibou at gmail.com)
Date: Sun Sep 23 13:01:19 EDT 2007


I am trying to make the DrScheme gui with MrEd, but i have some
problems :

- Canvas editor are not stretchables. I have no idea from why ?
- I have used grow-box-spacer-pane. Is that the good object for static
bar ?

My short code :

(define frame-1 (new frame%
                     (label "Test...")
                     (min-height 500) (min-width 600)))

;; Container
(define vpanel-1 (new vertical-panel% (parent frame-1)))

(define gbsp-toolbar (new grow-box-spacer-pane%
                            (parent vpanel-1)
                            (min-height 30)))

(define vpane-editor (new vertical-panel%
                          (parent vpanel-1)
                          (style '(border))
                          (stretchable-height #t)
                          (spacing 5)))
(define canvas-editor (new editor-canvas%
                           (parent vpane-editor)
                           (stretchable-height #t)
                           (style '(no-hscroll))))

(define canvas-evaluator (new editor-canvas%
                              (parent vpane-editor)
                              (stretchable-height #t)
                              (style '(no-hscroll))))

(define gbsp-infobar (new grow-box-spacer-pane%
                            (parent vpanel-1)
                            (min-height 30)))

(define text-1 (make-object text%))
(define text-2 (make-object text%))

(send canvas-editor set-editor text-1)
(send canvas-evaluator set-editor text-2)

;; On centre la fenêtre
(send frame-1 center 'both)
;; On affiche la fenêtre
(send frame-1 show #t)


Posted on the users mailing list.