1. Greg Bergbower
  2. PowerBuilder
  3. Wednesday, 26 August 2020 19:47 PM UTC

I have a base window object w_parent that includes datawindow control dw_1.  I create a new window w_child that inherits from w_parent.  On w_child I assign datawindow object d_customer to datawindow control dw_1.  Also on w_child I insert a new datawindow control dw_2 and hook up the same datawindow object d_customer to it.

DataWindow Control dw_1 on w_child has a height of 400.

DataWindow Control dw_2 on w_child has a height of 400

DataWindow Object detail band has a height of 1000

When running the application from PB, dw_1 and dw_2 are different heights even though they are tied to the same datawindow object.  dw_1 reflects 1000 while dw_2 reflects 400.  The properties of the 2 datawindow controls are identical.  dw_1 has a tab order of 10 on both w_parent and w_child.  Autosize Height is turned off on d_customer.

I would expect the functionality of both datawindow controls to be the same but it appears the datawindow object that includes inheritance is pulling the height from the datawindow object assigned to it where as the datawindow object not from inheritance is pulling the height from the datawindow control.

Is this by design or a bug?  Or am I missing a setting somewhere?

 

 

thanks,

greg

 

Accepted Answer
John Fauss Accepted Answer Pending Moderation
  1. Wednesday, 26 August 2020 20:15 PM UTC
  2. PowerBuilder
  3. # Permalink

Greetings, Greg - 

It's difficult to say with certainty without seeing the source code for the w_parent and w_child windows, but if I were to guess, there is code in w_parent that interrogates the size of the detail band in dw_1 and resizes this control dynamically in order to show you the entire detail band contents. I would begin by looking at any code residing in the Resize event in w_parent and see where that leads you.

Regards, John

Comment
  1. Greg Bergbower
  2. Wednesday, 26 August 2020 20:38 PM UTC
Logic inside the Resize event in w_parent was the culprit. Issue resolved. Thank you John.
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Wednesday, 26 August 2020 21:30 PM UTC
Thanks for sharing the solution!
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 26 August 2020 19:54 PM UTC
  2. PowerBuilder
  3. # 1

Hi Greg;

  DW_1 & DW_2 are "controls" and have no control over AutoSizeHeight settings. What your looking for are the DW "objects" that are assigned to DW controls. The DWO's are the ones to review.

HTH

Regards ... Chris

Comment
  1. Greg Bergbower
  2. Wednesday, 26 August 2020 20:10 PM UTC
Both controls are using the exact same datawindow object. I would expect them to display the same but they are not, and that is my question, why are they are not behaving in the same manner?
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 26 August 2020 20:19 PM UTC
If that is truely the case, then have a look at the 2nd DW control to see if it tries to modify the DWO somehow via a Modify() command or DOT notation.
  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.