racket/gui: fix reparent' with a
pane%' target
This commit is contained in:
parent
89ef600b6e
commit
6afc9d5e8c
|
@ -55,7 +55,8 @@
|
|||
[get-x (lambda () pos-x)]
|
||||
[get-y (lambda () pos-y)]
|
||||
[get-width (lambda () width)]
|
||||
[get-height (lambda () height)])
|
||||
[get-height (lambda () height)]
|
||||
[adopt-child (lambda (c) (send (get-parent) adopt-child c))])
|
||||
(sequence (super-init))))
|
||||
|
||||
(define tab-h-border (if (eq? (system-type) 'unix)
|
||||
|
|
|
@ -519,7 +519,10 @@
|
|||
(let ([v (send c get-selection)])
|
||||
(when (positive? v)
|
||||
(define f (new frame% [label "New Parent"]))
|
||||
(send (list-ref items (sub1 v)) reparent f)
|
||||
(define p (if (zero? (random 2))
|
||||
(new vertical-pane% [parent f])
|
||||
f))
|
||||
(send (list-ref items (sub1 v)) reparent p)
|
||||
(send f show #t)
|
||||
(send c set-selection 0)))))
|
||||
(cons (make-object popup-test-canvas%
|
||||
|
|
Loading…
Reference in New Issue
Block a user