[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Resizing object graphics on X
- Subject: Re: Resizing object graphics on X
- From: Pavel Romashkin <promashkin(at)cmdl.noaa.gov>
- Date: Wed, 25 Oct 2000 15:03:44 -0600
- Newsgroups: comp.lang.idl-pvwave
- Organization: NOAA-CMDL-CIRES
- References: <25OCT00.18172414@feda34.fed.ornl.gov>
- Reply-To: promashkin(at)cmdl.noaa.gov
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:21897
If you take a look at a caveat for DIMENSIONS keyword for the
IDGgrWindow object, then you will notice that it says "Note - Changing
DIMENSIONS properties is merely a request and may be ignored for various
reasons. "
Therefore, I think that your Windows toolkit fullfills that request *for
some reason*, while X ignores it for *some other reason*. Try the
following, it works on either one. Besides, at first I could see nothing
but a black box on both Mac and X, because the machines I have do not
(apparently) support a default OS backing store. So I added that, too.
Cheers,
Pavel
;***** MODIFIED *********
pro t_event, event
widget_control, event.top, get_uvalue=info, /no_copy
info.oWindow->SetProperty, Dimension=[event.x, event.y]
widget_control, info.draw, draw_xsize=event.x, $
draw_ysize=event.y
info.oWindow->draw, info.oView
widget_control, event.top, set_uvalue=info, /no_copy
end
PRO t
x=findgen(100)
y=sin(x/10)
oModel = obj_new('IDLgrModel')
oView = obj_new('IDLgrView')
oPlot = obj_new('IDLgrPlot', x, y)
oPlot->GetProperty, XRANGE=xr, YRange=yr
xs = Norm_Coord(xr)
xs[0] = xs[0] - 0.5
ys = Norm_Coord(yr)
ys[0] = ys[0] - 0.5
oPlot->SetProperty, XCoord_conv=xs, YCoord_conv=ys
oModel->add, oPlot
oView->add, oModel
base = Widget_base( uname='t', /tlb_size_events)
draw = Widget_draw( base, graphics_level=2, retain=2 )
widget_control, base, /realize
widget_control, draw, get_value=oWindow
oWindow->Draw, oView
info = { oWindow: oWindow, $
oView: oView , draw: draw }
widget_control, base, set_uvalue=info, /No_Copy
xmanager, 't', base
end