comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Resizing object graphics on X
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Resizing object graphics on X [message #22192 is a reply to message #22181] Wed, 25 October 2000 00:00 Go to previous messageGo to previous message
promashkin is currently offline  promashkin
Messages: 169
Registered: December 1999
Senior Member
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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Double tickmark annotations
Next Topic: Double tickmark annotations

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 10:49:18 PDT 2025

Total time taken to generate the page: 0.74217 seconds