Strange widget resize problem [message #9991] |
Wed, 01 October 1997 00:00 |
Justin Baker
Messages: 16 Registered: May 1995
|
Junior Member |
|
|
Hi there,
I've got a really strange problem with resizable widgets that I hope
somebody can help me with (or has at least seen !).
I am running IDL5.0.2 on an AIX (X windows) platform.
I have written a program which displays a geographical map in a draw
widget as part of a widget hiearchy. When the user resizes the
application with the mouse, the draw widget should also resize.
Strangely enough, this aspect of the application works on some X
displays but not on others. I am using the UPDATE keyword to
widget_control (for the widget base) but this does not seem to help.
Please note : the code is identical but the behaviour is different!
I have checked the configuration of the different X-terminals and can
see nothing obvious (both using backing store &c.).
My application is quite large, but the relevant routine is:
pro changesize, info, x, y
; got a resize event WIDGET_BASE and now passing in
; event.x as x and event.y as y
; info is a large struct containing lots of useful fields
s = getLabelInfo(info)
g=info.gui_info
Widget_Control, g.base, update=0
; change size of base
Widget_Control, g.base, XSIZE=x, YSIZE=y
; change size of draw widget
widget_control, g.draw, XSIZE=x, YSIZE=y-40
; store new x and y for next time
info.gui_info.draw_width = x
info.gui_info.draw_height = y-40
Widget_Control,g.infoLabel,set_value=s
Widget_Control, g.base, /update
; throw out old pixmap and build new one
wdelete, info.map_info.map_pixmap
window, xsize=x, ysize=y-40, /free, /pixmap
map_pixmap=!d.window
info.map_info.map_pixmap = map_pixmap
mapUpdate, info
end
Thanks in advance,
Justin.
|
|
|