[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Simple bitmap question
> Long story short: use on-paint :)
O.k. I'll buy that.
Adddemdum:
I accidently fell over this paragraph in Chapter 5 "Drawing Toolbox
Overview" of
the "MrEd Graphical Toolbox Manual".
;; Show the frame
(send frame show #t)
;; Wait a second to let the window get ready
(sleep/yield 1)
;; Draw the face
(draw-face dc)
The sleep/yield call is necessary under X because drawing to the canvas
has no
effect when the canvas is not shown. Although the (send frame show #t)
expression
queues a show request for the frame, the actual display of the frame and
its canvas
requires handling several events. The sleep/yield procedure pauses for a
specified
number of seconds, handling events while it pauses.
[And continues to telle that overridin the on-paint method is better.]
Although overriding on-paint is the Right Thing (TM), I decided to try a
(sleep/yield 1)
and it actually worked too (until I resize of course).
Still, I'll stick to overriding on-paint.
Thanks goes to Robby.
--
Jens Axel