| Home | Previous Lesson: Sheets Next Lesson: Moving Sheets |
Whenever a MDI Frame is painted and saved, PowerBuilder automatically creates a control called MDI_1 which refers to the Client area. Use this name in your scripts to specifically refer to the Client area, but note that unlike other controls, MDI_1 has no events associated with it.
Note that MDI_1 is not a reserved word, so, there is nothing that can stop you from calling a control as MDI_1. However, this isn't recommended, as it obviously creates confusion in the script.
If you add an object to the MDI frame, the size of the client area will be affected. Resizing of the client area has to be taken care by you, by writing script for the MDI Frame resize event.
If you don't resize the client area in your script, users will be able to open sheets, but they won't be visible.
When resizing the client area, you have to take the space occupied by the toolbars, objects and the status bar into account. The WorkspaceWidth() and WorkspaceHeight() functions help in determining the exact size of the MDI Frame.
| Home | Previous Lesson: Sheets Next Lesson: Moving Sheets |