comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: Persistent Object Graphics Not Persistent in Resizeable Windows

Persistent Object Graphics Not Persistent in Resizeable Windows
type: item
description: Folks, I've run into a problem in which I lose all my axes labeling if I resize my draw widget object window before evoking the Draw method of the window. Here is a bug report and some sample code to see the problem. (Those of you who want to see how to add axes to a surface plot, take note. :-)) Cheers, David ************************************************************ *********** Name: David Fanning E-mail Address: davidf@dfanning.com IDL version: { x86 Win32 Windows 5.0 Apr 28 1997} Platform and OS: WindowsNT 4.0, Service Pack 1 Description of Problem: ----------------------------------------------- "Persistent" object graphics are not very persistent if you resize the object window before you evoke the Draw method. Here I am losing the axes labeling when the window is resized. Example Code: --------------------------------------------------------- Pro XSurface_Cleanup, tlb ; Come here when program dies. Free all created objects. Widget_Control, tlb, Get_UValue=info Obj_Destroy, info.thisContainer END ;----------------------------------------------------------- -------- PRO XSurface_Resize, event ; The only events generated by this simple program are resize ; events, which are handled here. ; Get the info structure. Widget_Control, event.top, Get_UValue=info, /No_Copy ; Resize the draw widget. ;88888888888888888888888888888888888888888888888888888888888 888 ; Here is the problem. Comment this line out and uncomment the ; two below it to see that the problem comes from resizing the ; window. info.thisWindow->SetProperty, Dimension= ;info.thisWindow->erase, Color= ;Wait, 1 ;88888888888888888888888888888888888888888888888888888888888 888 ; Redisplay the graphic. info.thisWindow->Draw, info.thisView ;Put the info structure back. Widget_Control, event.top, Set_UValue=info, /No_Copy END ;----------------------------------------------------------- -------- PRO XSurface, data ; Need some data. Catch, error IF error NE 0 THEN BEGIN ; Can't find LoadData. data = DIST(40) G…
creator: davidf
date: 1997-06-06T07:00:00-00:00