1. Pete Yankovich
  2. PowerBuilder
  3. Tuesday, 25 August 2020 14:08 PM UTC

In PB 2017R2, I have a window ultimately inherited from pfc_w_sheet.  The window contains dynamically created dw controls based on number of rows in a db table.  The window has a vertical scrollbar, but when the number of controls hits a certain number, not all are displayed on the window. I thought the scrollbar would have taken care of that.

What might I do?

Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 27 August 2020 09:50 AM UTC
  2. PowerBuilder
  3. # 1

Have you tried redrawing the window after creating the new objects which are out of boundaries?

If that doesn't work, try launching a resize event.

Just guessing, but it might work.

 

Comment
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Thursday, 27 August 2020 23:56 PM UTC
  2. PowerBuilder
  3. # 2

In addition, to speed up this process I'd recommend :

ll_rc = window_1.SetRedraw (FALSE)
// implement creating dynamic objects
ll_rc = window_1.SetRedraw (TRUE)


If that does not resolve the issue, then try this logic:

ll_rc = window_1.SetRedraw (FALSE)
// implement creating dynamic objects
// Loop through each dynamically created object and set
           object.VISIBLE= TRUE
           object.ENABLED = TRUE
ll_rc = window_1.SetRedraw (TRUE)

 

Good Luck,

Olan

Comment
  1. Pete Yankovich
  2. Monday, 31 August 2020 18:34 PM UTC
Thanks Olan, I will try what you suggest.

I have another issue. I want to close a window dynamically if a data store returns no rows. That's fine, but then the mdi frame loses it's menu toolbar items. I've tried a few things, but haven't been able to resolve.
  1. Helpful
  1. Miguel Leeuwe
  2. Tuesday, 1 September 2020 11:15 AM UTC
Make sure the toolbar is "the same" on the menu assigned to the frame window as the toolbar of the menu assigned to the window that you're about to close.

Also checkout of the toolbar on the frame is visible:

- settoolbar()

- toolbarvisible
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 1 September 2020 19:31 PM UTC
  2. PowerBuilder
  3. # 3

Hi Pete;

  Tip:  check out the Scrolling property settings on the Window class itself. If you end up with lots of controls, you may need to "tweak" these to get window scrolling to work properly.

HTH

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.