Resetting a DRAW widget to have new size/scroll area...? [message #3009] |
Mon, 31 October 1994 17:22  |
Russ Welti
Messages: 27 Registered: October 1994
|
Junior Member |
|
|
I have an application with one main window, which has one
drawing area, into which I TV images. Does anyone know:
When user loads a new image file into my app, after I load and check
it, I have a problem resizing the DRAW widget to have new
XSIZE/YSIZE and X_SCROLL_SIZE/Y_SCROLL_SIZE. The new image appears,
but the DRAW widget still has the values for the previous image, which
don't make sense given the new size of the image. If the new image
is larger than the old, you can't view any more of it than the old
image's dimensions.
I have tried DESTROYING and rebuilding the draw widget, but with
only partial success at best. This is probably what I would do in X
Windows...
Does anyone know if it is even possible to destroy and replace widgets
from a realized, event-looping application? When I do it, the window
does a quick shrink and resize; but a tv to the new draw widget has
no effect, and things get worse from there.
My interim working solution at the moment is to destroy the entire
BASE widget and rebuild the app from scratch, as if it was the first
invocation. This is a bit disconcerting, as the app disappears for a
few seconds, and one wonders if it crashed... ;)
Thank you for any pointers,
\
Russ Welti /-\
(c-g)
University of Washington \-/
Dept. of Molecular Biotechnology M/S FJ-20 /
Seattle, WA 98195 /-\
(206) 685-3840 voice (a-t)
(206) 685-7344 FAX \-/
rwelti@u.washington.edu \
|
|
|