Working with windows (not the OS)
Issue: 7.3 (March/April 2009)
Author: Marc Zeedar editor-at-rbdeveloper.com
Article Description: No description available.
Article Length (in bytes): 16,692
Starting Page Number: 42
RBD Number: 7312
7312.zip Updated: Monday, March 2, 2009 at 1:37 PM
Related Link(s): None
Known Limitations: None
Excerpt of article text...
Windows are one of the most basic visual structures of a Graphical User Interface, yet working with them within REALbasic can be confusing for the beginner. Today we're going to explore how to show, hide, and close windows, work with different types of windows, create an app that lets us open multiple windows, and we'll even make a dynamic menu of all our app's open documents. I'll also show how to make a simple Splash screen for your applications.
Basic Window Handling
On the surface, adding a window to a REALbasic project is easy: just click the "New Window" button in the IDE and RB adds a number window to the project. Working with the window is also easy: double-click on it to open it in the Editor and drag controls onto the window. You can also refer to the window by name within code, so working with the window should be easy, right?
Well, things start to get complicated at this point. For instance, how do you display this second window? With a single-window app, REALbasic automatically displays the first window by default. But additional windows will not automatically display. You must manually tell them to display. For instance, to get the second window to display at launch you could add this code to App.Open:
...End of Excerpt. Please purchase the magazine to read the full article.
Article copyrighted by REALbasic Developer magazine. All rights reserved.