1. ATK Gimmy Susan
  2. PowerBuilder
  3. Tuesday, 26 May 2020 22:38 PM UTC

Hi Roland.

In a post Roland Smith wrote me:

<< Sheet windows are displayed within a control called mdi_1. The resize event of the window can change the x / y / width / height of mdi_1 >>

What do you mean ?
Can you explain better this 'thing' of mdi_1? I have no mdi_1 control ! My mdi is w_prog_frame_mdi.

thanks in advance

GMY

Accepted Answer
John Fauss Accepted Answer Pending Moderation
  1. Wednesday, 27 May 2020 02:34 AM UTC
  2. PowerBuilder
  3. # Permalink

Greetings, Gimmy - 

I suggest you read the PB Help topic titled "MDIClient object".

If I may expand a little on what Roland has explained: If you edit source for the frame window (w_prog_frame_mdi) in your app, at the very top you will likely see these lines (or something close):

forward
global type w_prog_frame_mdi from window
end type
type mdi_1 from mdiclient within w_prog_frame_mdi
end type

When you have a window of type MDI! or MDIHelp!, you can see by the source code that PB automatically creates an object of type MDIClient inside of the MDI (frame) window and names this object mdi_1. The visible workspace you see within a frame window is actually the MDIClient object. The MDIClient object is where all sheet windows are displayed, move, resized, etc. ... not the frame window. The frame window normally contains one thing... the MDIClient object, mdi_1.

Normally, PB automatically resizes mdi_1 to respond to toolbar changes, resizing of the frame window, etc. This is the behavior you are undoubtedly familiar with.

If you place an object, like a picture control, in your frame window, PB no longer performs any automatic resizing of the MDIClient object...You have to take on that responsibility. This is what the Help topic refers to as a "Custom MDI window".

HTH, Regards - John

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Wednesday, 27 May 2020 01:45 AM UTC
  2. PowerBuilder
  3. # 1

When you have a mdi! or mdihelp! type window, at runtime the window automatically creates a control called mdi_1 which is the area that the sheet windows are displayed in.

If you place a control on the window in design mode, mdi_1 will have a size of 0/0 and will not be resized when the window size changes. In that case you have to add code to the window resize event to manually resize mdi_1.

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.