1. Troy Cowan
  2. PowerBuilder
  3. Thursday, 6 April 2023 16:54 PM UTC

My team supports a PowerBuilder application that is quite old. We have noticed that on some windows, the vertical scroll bar does not move the buttons and text boxes and such up and down, but instead seems to select different rows of data to show in the datawindows. I can't seem to find any documentation to let me know what is going on, and what do to do change the behavior. 

Hope this makes sense to someone who can help me out. 

Andreas Mykonios Accepted Answer Pending Moderation
  1. Friday, 7 April 2023 12:48 PM UTC
  2. PowerBuilder
  3. # 1

Hi again

If for some reason you create a tabpage with height greater than your tab control and you don't have logic to resize that control, then you will be able to see a part of your tabpage (the part that is under your tab control's width & height). The rest of the control will exist but will be hidden. You will also have the same issue if your datawindow is bigger than the control (window / userobject) where you placed it and your window / userobject cannot resize.

This can also happen if you do have a resize logic that in some cases doesn't work well (what Chris mentioned in his answer).

Now, why do I have the suspicion that something like that is happening. Take a look at your screenshot:

While the vertical scroll bar belongs to the datawindow, the horizontal doesn't. It seem's like your window (or whatever object the horizontal scroll bar belongs to) is shorter than your tab control or tabpage or datawindow or all of them... Is there another vertical scrollbar on the right side? Based on your screen shot we cannot be sure. It may be a smaller window that only shows the horizontal scroll bar...

To further find what's happening try first to investigate that issue... Cannot say more as I don't have a way to see your objects / controls.

Andreas.

Comment
  1. Andreas Mykonios
  2. Friday, 7 April 2023 13:17 PM UTC
Probably it's not a bug. Powerbuilder doesn't resize visual controls inside any window - userobject. If you need to create a resize strategy you will have to: a) use a service from those available as addons or in frameworks (like pfc), b) code it as you want.

Andreas.
  1. Helpful 1
  1. Andreas Mykonios
  2. Friday, 7 April 2023 13:28 PM UTC
Also, a freeform datawindow (I believe you are using a freeform datawindow), will show more than one rows only if they can fit to completely show. That means that you cannot scroll and see part of rows... The only exception in that rule is having a dataobject that in preview will have a row with a width or height bigger than the one defined in datawindow control. In this scenario scroll may happen inside visible row, to allow you to view controls that may be not visible and you can go to previous / next row by pressing page up or down.

Andreas.
  1. Helpful
  1. Troy Cowan
  2. Friday, 7 April 2023 16:56 PM UTC
OK, thank you for all you comments. I will try to understand them and see if they lead to anything.
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Thursday, 6 April 2023 17:49 PM UTC
  2. PowerBuilder
  3. # 2

Hi, Troy -

Are you referring to a vertical scroll bar control that resides in a window or a vertical scroll bar that is contained and managed within a DataWindow control? Can you post a picture or two to illustrate what you are asking about?

Best regards, John

Comment
There are no comments made yet.
Troy Cowan Accepted Answer Pending Moderation
  1. Thursday, 6 April 2023 18:11 PM UTC
  2. PowerBuilder
  3. # 3

I'm talking about selecting a DataObject in the painter and enabling the VScrollBar checkbox in its properties.

Here's some images that I hope will help to explain it. First, here is an example of a scroll bar working as I would expect and desire. In this first image, you can see that the scroll bar is at the top.

This next image is of the same controls, with the scroll bar moved to the bottom. You can see that the controls in the window have moved.

 

Now, here is a scroll bar that doesn't act as I would expect or desire. First, you can see the scroll bar is at the top.

Now, I have moved the scroll bar to the bottom. The controls (buttons, labels, etc) are in the exact same location, but the values have changed. You can only see the radio button values change in this example.

Hope this helps.

 

 

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 6 April 2023 18:31 PM UTC
Hi Troy;

Most likely, your App has a logic problem in the parent Window's RESIZE event. I would recheck your code in there. HTH

Regards ..> Chris
  1. Helpful 1
  1. John Fauss
  2. Thursday, 6 April 2023 19:04 PM UTC
@Troy - Without having seen the layout of the "Drugs" DataWindow in the DW Painter, it appears that this DW has all or most of the information defined in the Header band. This would explain why it does not appear to scroll. Please check if this is true and let us know? Thanks.
  1. Helpful 1
  1. Troy Cowan
  2. Friday, 7 April 2023 11:17 AM UTC
Hi John. I checked and no, both the Medical and Drugs datawindows have all their information in the Detail band.
  1. Helpful
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Friday, 7 April 2023 11:31 AM UTC
  2. PowerBuilder
  3. # 4

Hi.

First of all it seems to me like the second datawindow (drugs tab) has two rows (one with data and one empty). Can you check rowcount value for that datawindow? Also, how do you open that tab page? Is this a userobject opened using opentab? It seems to me like a user object having different width / height than you tab control (your tabpage is larger and doesn't fit). If I am right to my previous assumptions check again your controls height.

Andreas.

Comment
  1. Troy Cowan
  2. Friday, 7 April 2023 12:09 PM UTC
Can you check rowcount value for that datawindow?

Troy: Actually, the way the select statement is written for BOTH tabs, there will only ever be one row that is selected for each tab.

Is this a userobject opened using opentab?

Troy: It seems not.

....check again your controls height.

Troy: Could you describe this a little more? What would I do to test this?
  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.