pringle@dec05.cs.monash.edu.au (Glen Pringle) (06/04/91)
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 |
--------------------------------------------------------------------------