[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Resizing object graphics on X

davidf@dfanning.com (David Fanning) wrote:
> Dave Greenwood (greenwoodde@ornl.gov) writes:
> > 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?
> Wow. That's weird. :-(
> That is how I would write the code. In fact, that
> is how I *write* the code in many of my programs,

Yeah, I know - I took the idea from one of your programs.  ;-)

The solution came from one of those newsgroup-shy RSI folks (thanks JP).
What I needed to do was to resize the draw *widget* instead of the draw

  drawid = widget_info(event.top, find_by_uname='drawwidget')
  widget_control, drawid, xsize = event.x, ysize = event.y
  info.oWindow->draw, info.oView

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