Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
Re: How can i get SCR_XSIZE, SCR_YSIZE of WIDGET_BASE
Privet Dmitry, Widget_info returns the original size of the top base, which it had when it was first realized; I don't know why manual resizing does not alter this values, I think it should. To get new size, use event.x and event.y fields from the Resize event structure. However, once that event happened (and you did not save new values from Resize event), that's it - the new size is unknown (at least as far as I saw from playing with it). I think that if the size of the top base changed through growth of child widgets (I posted an annoying behavior like that to the group a few days ago), then the size of the top base reported by widget_info, /geometry does change. SCR_YSIZE is probably the same as YSIZE because the default units for YSIZE are pixels, just as for SCR_YSIZE, and in this case YSIZE will be the same as SCR_YSIZE. Poka! Pavel Dmitriy Ryzhov wrote: > Hi! > I try to use construction "geom=Widget_Info(event.top, /GEOMETRY)" in > OnSizeChange event but it returns equals numbers( for example > { 0.000000 0.000000 1024.00 45.0000 1024.00 > 45.0000 0.000000 0.000000 0.000000 3.00000 3.00000 > 3.00000}) every time event happen. What does it mean? > Why numbers don't changing? And why SCR_YSIZE is equal to YSIZE? > What primary method to get SCR_XSIZE and other? > > -- > Regard, Dmitriy Ryzhov.
Dmitriy Ryzhov (dryzhov@dialup.ptt.ru) writes: > I try to use construction "geom=Widget_Info(event.top, /GEOMETRY)" in > OnSizeChange event but it returns equals numbers( for example > { 0.000000 0.000000 1024.00 45.0000 1024.00 > 45.0000 0.000000 0.000000 0.000000 3.00000 3.00000 > 3.00000}) every time event happen. What does it mean? > Why numbers don't changing? And why SCR_YSIZE is equal to YSIZE? > What primary method to get SCR_XSIZE and other? Instead of printing the result, try this: Help, geom, /Structure The result is a structure. So, for example, to get the X screen size: x_screen_size = geom.scr_xsize Cheers, David -- David Fanning, Ph.D. Fanning Software Consulting Phone: 970-221-0438 E-Mail: davidf@dfanning.com Coyote's Guide to IDL Programming: http://www.dfanning.com/ Toll-Free IDL Book Orders: 1-888-461-0155