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

Home » Public Forums » archive » Resizing object graphics on X
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Resizing object graphics on X [message #22197] Wed, 25 October 2000 00:00
Dave Greenwood is currently offline  Dave Greenwood
Messages: 33
Registered: October 2000
Member
I don't often work with IDL so please bear with my sloppy terminology.

I'm trying to learn a little about object graphics. I'd like to make
my widgets resizable, but I'm obviously missing something. The following
program (based on some code from the IDL examples and David's web site)
resizes the way I'd like on my PeeCee, but not when using X (on HP-UX or
VMS). On the PC, when I expand the size of the widget the graphics
display expands to fill the widget. Using X the graphics display stays
the original size in the lower left corner (but the "black drawing area"
expands to fill the widget). I'm using IDL 5.3 on all systems (well,
actually, the PC has 5.3.1.)

What do I need to do to make resizing work on X devices?

Thanks,
Dave
--------------
Dave Greenwood Email: Greenwoodde@ORNL.GOV
Oak Ridge National Lab %STD-W-DISCLAIMER, I only speak for myself

============================================================ ============
pro t_event, event

widget_control, event.top, get_uvalue=info, /no_copy

info.oWindow->SetProperty, Dimension=[event.x, 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 )
widget_control, base, /realize
widget_control, draw, get_value=oWindow
oWindow->Draw, oView

info = { oWindow: oWindow, $
oView: oView }

widget_control, base, set_uvalue=info, /No_Copy

xmanager, 't', base

end
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Double tickmark annotations
Next Topic: seeking CALL_EXTERNAL examples...

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

Current Time: Wed Oct 08 15:26:35 PDT 2025

Total time taken to generate the page: 0.00584 seconds