Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!spool.mu.edu!uunet!munnari.oz.au!bruce!dec05!pringle From: pringle@dec05.cs.monash.edu.au (Glen Pringle) Newsgroups: comp.windows.x Subject: Resizing a widgets window from within Resize Summary: How do I make the window size of a widget change its size Keywords: widget resize Message-ID: Date: 4 Jun 91 04:06:50 GMT Sender: news@bruce.cs.monash.OZ.AU Distribution: comp Lines: 28 I have written a widget to display an image. When a new image is to be displayed, I want the widget to resize itself to the size of the image. What I have tried doing is: if (w->core.width != image->cols) { w->core.width=image->cols; } if (w->core.height != image->rows) { w->core.height=image->rows; } but this doesn't resize the widgets window. I also tried doing things like XtConfigureWidget(w, w->core.width, w->core.height, w->core.border_width); or setting the width and height of the widget using XtSetValues() but none of this works. I am inheriting from the core widget. Must I inherit from some other type of widget (such as the form widget) to allow resize or is it something else that I have missed? disclaimer: I am new at writing my own widgets :-) -------------------------------------------------------------------------- | GLen Pringle | Research is what I'm doing when | | Monash University, Australia | I don't know what I'm doing. | | pringle@bruce.cs.monash.edu.au | - Bert Whitney | --------------------------------------------------------------------------