1. Clarence Chamorro
  2. PowerBuilder
  3. Saturday, 13 August 2022 14:44 PM UTC

I have an application were I use PFC Resizing Service in every window, dw and any object. Everything is working perfect.

When User make any window bigger or smaller all columns resize accordingly as position and percentages declared in the constructor event of the dw and the rest of the object in the window resize accordingly as position and percentages declared in the Preopen event of the window. Everything fine.

Now I want to resize the font everywhere (window, objects, dw) accordingly as the size of the window.  Any suggestions or direction how to accomplish the resizing Font will be greatly appreciate.

Regards,

Clarence.

Who is viewing this page
John Fauss Accepted Answer Pending Moderation
  1. Saturday, 13 August 2022 16:41 PM UTC
  2. PowerBuilder
  3. # 1

Hi, Clarence - 

The PFC does not provide that kind of resizing for controls (DragObject's, actually) in windows... only the DataWindow resize service does this. You will have to either find the code to do this elsewhere or develop the functionality yourself.

Best regards, John

Comment
  1. Clarence Chamorro
  2. Saturday, 13 August 2022 16:49 PM UTC
Dr Fauss thank you for replaying to my question.



How do you use the change of the font size in the PFC dw resize service?



Regards,



Clarence.
  1. Helpful
  1. Clarence Chamorro
  2. Saturday, 13 August 2022 17:03 PM UTC
This is the way I activate the service in the dw and the % resizing parameters.

//cch dw Construction Event

of_SetResize(true)



// Args - PercentageX, PercentageY, PercentageWidth, PercentageHeight



inv_resize.of_Register('datetime1_t', 0, 0, 5, 0)

inv_resize.of_Register('datetime1', 0, 0, 5, 0)

inv_resize.of_Register('number_t', 5, 0, 40, 0)

inv_resize.of_Register('number', 5, 0, 40, 0)

inv_resize.of_Register('datetime2_t', 45, 0, 5, 0)

inv_resize.of_Register('datetime2', 45, 0, 5, 0)



//cch end dw construction event



but I not know how to pass parameters for the font size. I will appreciate if you share that with us.



(Of course I activate the Resizing service in the PreOpen event of the window and register the dw with its resizing %)



Regards,



Clarence
  1. Helpful
  1. John Fauss
  2. Saturday, 13 August 2022 17:04 PM UTC
The DW Resize service is a separate object/service from the Window resize service. The DW Resize service can only be used to affect the contents within a DataWindow object, and it supports (I believe, I've never used it) font resizing... but only for what is "inside of" the DataWindow. The Window resize service is designed to resize (change the width and/or height) and/or move (change the X,Y position) registered controls in a window. It does NOT contain any logic to after the point size used by any of the controls within the window, which I think is what you are wanting to do.

These are two separate services that are coded differently due to the differences between DWObjects (column/text/etc. objects) and Controls (DW controls, static text, edit mask, command buttons, etc). The controls in a window are managed/drawn by the WIndow operating system. The DWObjects within a DataWindow control are managed/drawn by the DataWindow Engine within PowerBuilder.
  1. Helpful 1
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.