I'm good at GUI in Visual Basic, but I can't seem to figure out GUI programming in IDL. The Example Application in the Help menu isn't really helpful. They're starting out with too complicated of a program in choosing to make an image editor. And they use terms I'm not familiar with such as "top level base".
Can anyone step me through a simpler example?
For example, I'd like to create a calculator that adds two numbers. The GUI should have 2 text boxes to accept input, a label for the + sign, a label for the - sign, a label for the answer, and a button to compute. The code for the button's press event should simply add the values in the two text boxes and display the result in the answer label.
In IDL I've opened a new GUI and placed the objects on the GUI. But I don't know how to add code to the button's press event. I do not see an editor that allows me to start typing code. I can see the button's events, and it appears that I should add a function or procedure name to the event, but where do I type the code for this procedure?
Here's a screenshot of my best effort so far. Also included is my identical effort in Visual Basic. It took all of 2 minutes to make this in VB. It can't be that hard to do in IDL.
screenshot: http://orbitsimulator.com/misc/gui.GIF
Also, can anyone recommend a book that teaches me more about GUI in IDL, so I don't have to come to this forum every time I have a simple question.
Thanks!!
|