1. mike S
  2. PowerBuilder
  3. Wednesday, 13 December 2023 18:51 PM UTC

the tabbed view mdi window will auto resize the mdi_client when a sheet is opened.

 

it notifies the mdi window with a resize event.  

the workspace workspaceheight() does not change.  workspaceheight does not take into account the tabs. 

 

The tabbedview feature seems to assume that the mdi client will only be under its' control.  which is not supposed to be the case if you have any object on the mdi window:

"In a custom MDI window, you determine the size of the client area. For example, when a frame has buttons below the menu bar in the frame, you size the client area so it begins below the buttons."

 

my mdiclient expects to have to resize the mdi client and nothing else will.  this is now broken and it doesn't seem that this new feature provides any way to get the information to properly size the client.  simply not reszing the mdi client does not work.  resizing the mdi client adds in a gap at the bottom which appears to be the height of the tabs.

 

how to you get the size of the tabs and how to do you get whether the tabs are displayed (yeah, i can figure out whether they are displayed by getfirstsheet)?  I assume there is no way do get this?

 

 

Mark Lee @Appeon Accepted Answer Pending Moderation
  1. Thursday, 14 December 2023 08:39 AM UTC
  2. PowerBuilder
  3. # 1

Hi Mike,

For “how to you get the size of the tabs” issue,
I don't quite understand why you need to do this. If only to control the current MDI client area to display other controls properly in the frame window resize event, I think not using the height of tabbedbar will not affect the layout either.
In addition, the MDI client area size is bound to the tabbedbar control. When a sheet is opened, the y value of the MDI client automatically increases and its height automatically decreases by one of the height of the tabbedbar.
When all sheets are closed, the y value of the MDI client automatically decreases and the height value automatically increases by one of the height of the tabbedbar.

If static interface layout registration is involved similar to FPC framework, then the problem is really difficult to deal with. Because after opening the Tabbedview function, the corresponding window built-in mditbb_1 control is a hidden object. The default height value is 0, and the actual height can only be taken in runtime. If your application does not involve dynamically adjusting the font type or size of the Tabbedview function, the height of the mditbb_1 control is a fixed value before and after the run, which is easier to work around.

If you think my understanding on this problem is incorrect, we might not be on the same page. Please provide a sample reproducible test case(including PBT/PBL) to us for more study. Thanks.


For “how to do you get whether the tabs are displayed” issue, it will be improved in the next version and corresponding new solution will be provided to solve it.

For your two problems, you can refer to Bruce’s example code in the following link to work around.

https://community.appeon.com/index.php/qna/q-a/pfc2022-resize-service-doesn-t-work-right-in-mdi-with-tabbedview

integer li_rc, li_index, li_count

w_frame lw_frame

string ls_classname

integer li_tabheight = 0



// Resize objects...

lw_frame = gnv_app.of_getframe( )



li_count = UpperBound ( lw_frame.control )

FOR li_index = 1 TO li_count

ls_classname = ClassName ( lw_frame.control[li_index] )

IF ls_classname = 'mditbb_1' THEN

li_tabheight = 104

END IF

NEXT



dw_1.Width = this.WorkSpaceWidth() - 40

dw_1.Height = this.WorkspaceHeight() - ( 40 + li_tabheight )



// Window Resize Behavior

li_rc = this.of_SetResize(true)

li_rc = this.inv_resize.of_Register(dw_1, inv_resize.scalerightbottom)
Comment
  1. mike S
  2. Thursday, 14 December 2023 15:28 PM UTC
I have a resize NVO that handles resizing the mdi client because i have multiple objects on the frame window. The user gets to select what is on the frame, so this all gets adjusted at runtime. Sometimes nothing is on the frame because that is what the user wants.



mditbb_1 - what TYPE is it? mdi_1 is MDICLIENT

there is no documentation on this, doesn't show up in the object browser either. the help is terrible. The examples should have hyperlinks to actual object definitions for the mditbb_1 ( i can only see from the online help of R3).



the height of the mditbb_1 should reflect at runtime the height of mditbb_1 . Or, failing that, the visible property should be true/false depending on whether the tabs are showing or not. (close all sheets and the tab goes away). It should be both. I see nothing in the 'what's new' about that being addressed.



In any case, the documentation should state exactly what happens with mdiclient. It is clear that mdiclient is now adjusted when the mditbb is used despite the documentation saying that it is not adjusted when you have objects on the frame. It should have been consistent with everything else, but here we are, so at least document it.
  1. Helpful
  1. Mark Lee @Appeon
  2. Friday, 15 December 2023 03:46 AM UTC
Hi Mike,

Thank you for your feedback and detailed explanation.

We agree with your point of view, and we will notify the documentation team to update the relevant information.



  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 13 December 2023 23:23 PM UTC
  2. PowerBuilder
  3. # 2

Hi Mike;

  Does your App code account for the new hidden area MDITBB_1 ?

Regards .. Chris

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.