1. Ramón San Félix Ramón
  2. PowerBuilder
  3. Friday, 11 March 2022 16:55 PM UTC

I've tried the example titled "PFC Resize without PFC" by Kevin Ridley (https://community.appeon.com/index.php/codeexchange/powerbuilder/268-pfc-resize-without-pfc#409) and it works fine for window controls, but I've tried to get resizing to work on datawindows and I can't get it to work.

It seems that when activating the service the call to the of_setrequestor() function to reference the datawindow in the instance variable is missing.

There is also nothing in the resize event of u_dw, the service should be called there...

With this I have activated the service in the open event of w_test.
I have tested it on dw_lower in the desc column.
I have tried to scale to the right without success. You have to enlarge the window a lot for the column to start scaling.
I don't know if I called the service wrong or if it works well.

I upload the example with what I have modified.

Can someone help me?

Attachments (1)
Accepted Answer
Ramón San Félix Ramón Accepted Answer Pending Moderation
  1. Tuesday, 15 March 2022 12:23 PM UTC
  2. PowerBuilder
  3. # Permalink

I got the answer...

I leave the result here, where you can see how the desc column is resized in the lower datawindows.

(Example build in PowerBuilder 2019 R3 2728)

Attachments (1)
Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Friday, 11 March 2022 17:22 PM UTC
  2. PowerBuilder
  3. # 1

It sounds like you are concerned that Resizing based on the PFC's Resize service object resizes window controls, but it does NOT resize the contents of a DataWindow.

This is a design limitation of this functionality... The PFC Resize service does NOT support the resizing of DW objects within a DW data object. it is coded to operate only on DragObjects (i.e., window controls).

Comment
  1. John Fauss
  2. Saturday, 17 August 2024 20:35 PM UTC
Changing the scaling in Windows does not trigger the Resize event... it only increases/decreases the number of pixels (dots) that are used to render visible objects, which makes them appear to be larger or smaller - producing a net effect that is similar to zooming in/out.

In Windows 10, Microsoft added optional DPI Awareness capabilities for applications, but there are some new API functions that must be called in order for an application to properly make use of this new functionality. Although PB does not currently support DPI Awareness, this capability is on the Roadmap for PB 2025: https://www.appeon.com/developers/roadmap
  1. Helpful
  1. Rajesh Kanna
  2. Sunday, 18 August 2024 18:41 PM UTC
Thanks John! for above clarification. but still i want some clarification.



I have observed that when the window is open state, if i change the scale value (150 to 125 %) in display setting it affects resize event of the window ( i added message box for height/width). So that window is minimized & found some space right side of the window. if i drag the right edge of the window it doesn't resize / fit.



could you please share your suggestion to fix this. Thanks!

  1. Helpful
  1. John Fauss
  2. Sunday, 18 August 2024 21:28 PM UTC
Instead of continuing to clutter this thread with a similar, yet different topic, I suggest you please ask it as a new question. Doing so will also help anyone else that searches the Q&A postings. Hint: It would be helpful for you to include partial screen shots that illustrates exactly what you mean by "doesn't resize / fit". 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.