1. Dionizas Antipenkovas
  2. PowerBuilder
  3. Monday, 27 March 2023 14:43 PM UTC

Hello,

I am trying to add RibbonBar to my MDI application and following tutorial: https://docs.appeon.com/pb2022/pbug/Replace_an_Application_Menu_with_a_RibbonBar.html#d0e25044

 

 I am using PB 2022 Build #1892

 

After changing MDI menu to empty one, I add ribbon control and adding the code to resize event. Unfortunately the code shown in Tutorial (see the link above) is not working as compiler throws error about missing mdi_1 object at lines below:

//resize mdi_1 based on RibbonBar
mdi_1.move (0, rbb_1.height + newheight - this.workspaceheight())
mdi_1.resize (newwidth, newheight - rbb_1.height - ( newheight - this.workspaceheight()))

 

I downloaded the Ribbon Application example and saw, that mdi_1 corresponds to MDIClient type which is missing on my w_mdi window.

As a result, opening sheets with openshee(..) does not work property as windows are not shown within MDI space.

 

Is there a way to add MDIClient object to MDI window?

 

Thanks!

BR,

D.

 

 

 

Roland Smith Accepted Answer Pending Moderation
  1. Monday, 27 March 2023 15:26 PM UTC
  2. PowerBuilder
  3. # 1

When the WindowType is set to mdi! or mdihelp!, the mdi_1 control is created automatically. The control is hidden while viewing the window in the painter.

Comment
There are no comments made yet.
Francisco Martinez @Appeon Accepted Answer Pending Moderation
  1. Monday, 27 March 2023 15:19 PM UTC
  2. PowerBuilder
  3. # 2

Hi Dionizas,

Did you set the window type to MDI?

 

 

Regards,
Francisco

Comment
  1. Dionizas Antipenkovas
  2. Tuesday, 28 March 2023 08:53 AM UTC
Thank You Francisco and Roland,



the problem was the old MDI window, which was created since 5th version of PB, so it did not have mdiclient.



I recreated MDI window from scratch and MDI_1 variable was added to the code. MDI and Ribbon started to work normaly.



Thank You for the Support!

BR,

D.

  1. Helpful 1
  1. Francisco Martinez @Appeon
  2. Tuesday, 28 March 2023 14:28 PM UTC
Thanks for sharing the answer!
  1. Helpful
  1. John Fauss
  2. Wednesday, 29 March 2023 01:21 AM UTC
@Dionizas - Would you please mark this question as resolved? Thanks!
  1. Helpful
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.