Sizing the client area – PB Docs 70

Sizing the client area

PowerBuilder sizes the client area in a standard MDI frame window automatically
and displays open sheets unclipped within the client area. It also sizes
the client area automatically if you have defined a toolbar based
on menu items, as described in the preceding section.

However, in a custom MDI frame window–where the client
area contains controls in addition to open sheets–PowerBuilder does
not size the client area; you must size it. If you do not size the
client area, the sheets will open but may not be visible and will
be clipped if they exceed the size of the client area.

If you plan to use an MDI toolbar with a custom MDI frame,
make sure the controls you place in the frame’s client
area are far enough away from the client area’s borders
so that the toolbar won’t obscure them when displayed.

note.gif Scrollbars display when a sheet is clipped If you selected HScrollBar and VScrollBar when defining the
window, the scrollbars display when a sheet is clipped. This means
not all the information in the sheet is displayed. The user can
then scroll to display the information.

When you create a custom MDI frame window, PowerBuilder creates
a control named MDI_1 to identify the client area of the
frame. If you have enabled AutoScript, MDI_1 displays in
the list of objects in the AutoScript popup window when you create
a script for the frame.

proc.gif To size or resize the client area when the frame
is opened or resized:

  1. Write a script for the frame’s
    Open or Resize event that:

    • Determines the size
      of the frame
    • Sizes the client area (MDI_1) appropriately

For example, the following script sizes the client area for
the frame w_genapp_frame. The frame has a series
of buttons running across the frame just below the menu and MicroHelp
at the bottom:

Mdi15.gif

note.gif About MicroHelpHeight MicroHelpHeight is a property of MDI_1 that PowerBuilder sets
when you select a window type for your MDI window. If you select
MDI Frame, there is no MicroHelp and MicroHelpHeight is 0; if you
select MDI Frame with MicroHelp, MicroHelpHeight is the height of
the MicroHelp.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x