Re: Another VM conundrum [message #37283 is a reply to message #37282] |
Fri, 12 December 2003 07:25   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Ben Tupper writes:
> I tested the routine appended below as a VM on MacOSX X11. It seems to
> work fine when other windows cover/uncover and the window is
> minimized/restored.
>
> I noticed that the terminal session I used changed from tcsh to idl and
> the the x11 terminal shows two windows: an xTerm (which I have to have
> up and ruu=ning but don't use for the idl command prompt) and viola!
> Test_VM. So, unlike Windows, you can track down the the widget even
> when it's hiding.
Well, this is not exactly testing the functionality that
I was talking about. Here is a modification that does.
Here is what you want to do.
1. Maximize your IDLDE window.
2. Type "TEST_VM". The application appears on the display,
and, yes, it has it's own application icon on the task
bar at the bottom.
3. Click the "Test It" button. A TextBox dialog appears.
Before you type text into this dialog, click in your
IDLDE window. Whoops! The dialog disappears behind the
IDLDE window and it is going to be *hard* to find!
You should be able to get the Test_VM application
back in front of the IDLDE, but you won't be able
to *do* anything with it until you find that damn
modal dialog!
You will need the TextBox program from my web page
to run the following program:
http://www.dfanning.com/programs/textbox.pro
Cheers,
David
;*********************************************************** ***
Pro Test_VM_Event, event
Widget_Control, event.top, Get_UValue=labelID
theText = TextBox(Title='Can you see me now?', Label="Type Something")
Widget_Control, labelID, Set_Value=theText
END
PRO Test_VM
device,DECOMPOSED=0,RETAIN=2
file = FILEPATH('rose.jpg', SUBDIRECTORY=['examples','data'])
trueImage = read_image(file)
dim = SIZE(trueImage,/Dim)
byteImage = bytscl(hanning(50,50))
Base = Widget_Base(title = 'Test_VM', column=1)
Draw = Widget_Draw(base, xsize = dim[1], ysize = dim[2])
labelID = Widget_Label(base, Value='Text Here', /Dynamic)
button = Widget_Button(base, Value='Test It')
Widget_Control, base, /realize, Set_UValue=labelID
Widget_Control, draw, get_value = drawID
Wset, drawID
TV, trueImage, true = 1
TV, byteImage
XMANAGER, 'test_vm', base
END
;*********************************************************** ***
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|