1. Libby Engelbret
  2. PowerBuilder
  3. Friday, 26 May 2023 21:20 PM UTC

We've got resizing working for our mdi windows with datawindows on them, but the drop-down datawindows within the datawindows do not resize (the font is still quite small). Is there any way to get these to resize? Please see the screenshot uploaded below.

Thanks

Attachments (1)
Accepted Answer
Ronnie Po Accepted Answer Pending Moderation
  1. Tuesday, 30 May 2023 20:07 PM UTC
  2. PowerBuilder
  3. # Permalink

Yes! This is possible.

You'll need to set certain attributes of the datawindowchild to match the zoom percentage of the window.

For example, suppose your column with the dddw is named "agency_location_code" and that you are zooming the window to 150% using the appeon resize service. You'll need to add code to the window's resize event (or wherever the appeon resize service hooks into your code). Your code should look something like:

datawindowchild ldwc_dddw

dw_1.getChild("agency_location_code", ldwc_dddw)

/* Zoom the dddw */
ldwc_dddw.modify("datawindow.zoom=150")

/* Zoom the width of the dropdown */
dw_1.object.agency_location_code.dddw.percentwidth = 150

 

Comment
There are no comments made yet.
Libby Engelbret Accepted Answer Pending Moderation
  1. Tuesday, 30 May 2023 12:49 PM UTC
  2. PowerBuilder
  3. # 1

Hi John,

Thank you for your response. Yes, we are resizing the window and the datawindow using the object eon_appeon_resize (which I believe was created by someone at Appeon) in PowerBuilder 2022. When you drag or maximize the window, it resizes the objects and font of everything on the window, including the datawindows. I just want to extrapolate that to include the drop-down datawindows. 

Thank you,

Libby

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 30 May 2023 18:53 PM UTC
Hi Libby;

There have been quite a few presentations at the yearly Appeon Elevate conference on resizing. Basically, a few PB eager beavers have isolated the PFC Resize service that can be used with any PB version, as follows: FYI...

https://community.appeon.com/index.php/codeexchange/powerbuilder/268-pfc-resize-without-pfc

https://community.appeon.com/index.php/qna/q-a/pfc-datawindow-resize-without-pfc

HTH

Regards.. Chris

PS: https://community.appeon.com/index.php/articles-blogs/tutorials-articles/2-powerbuilder/315-the-pfc-resize-service-complex-resizing-via-a-simple-methodology

  1. Helpful
  1. Libby Engelbret
  2. Tuesday, 30 May 2023 19:13 PM UTC
Hi Chris,

Thanks for the responses. From what I can tell, those links don't address datawindow resizing. The one post that says he's got it figured out provides an example which I downloaded and tried, and that just expanded the final column of a datawindow grid to the right. The font did not change, nor did any of the other columns. The object we are using works perfectly on datawindows, expanding and repositioning each field on the window to fill up the entire screen, as well as increasing the font. It seems like I'll need to try to figure out how it works so I can do the same for the drop-down datawindows. It's possible that the object I have was updated by someone else prior to my getting it, so it may not be the original one from the workaround.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Tuesday, 30 May 2023 20:27 PM UTC
Yes in either case .. child DWO's are not resized.
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Friday, 26 May 2023 21:36 PM UTC
  2. PowerBuilder
  3. # 2

Hi, Libby -

It appears from the image that your app is resizing the font size(s) in the window and DataWindow. Is this correct?

If so, can you please elaborate on what you are using to accomplish this? That might affect the response(s) you receive. It might also be useful to know what version/release/build of PB you are using.

Best regards, John

Comment
  1. John Fauss
  2. Saturday, 27 May 2023 02:00 AM UTC
If you are implementing the resizing functionality to increase legibility for some users, have you considered as an alternative increasing the scaling used by Windows for the display. Each individual can change scaling from the default 100% via Control Panel >> Settings >> Display >> Scale and Layout (in WIndows 10).

While dynamically scaling the contents of a child DataWindow may be possible in theory, it would, in my opinion, likely be very difficult and complex to accomplish... which is why resizing implementations such as the Resize service in the PFC does not provide this capability.
  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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.