My datawindows are based on u_dw. I have retrofitted the pfc code into the application and in the resize event of u_dw I have this:
IF IsValid(inv_dwresize) THEN
inv_dwresize.event pfc_resize(sizetype, newwidth, newheight)
END IF
This compiles, and fires when the window is resized, but doesn't resize anything. If I call the exact same code manually with a button, it does resize everything.
I put the following in the retrieveend event of u_dw, because I didn't know where else to do this. If you have any other ideas, please let me know. It does register the objects just fine, because it resizes all of them when I call it manually with the button.
string szObjects, szObject, szType
this.of_set_dwresize(true)
inv_dwresize.of_setrequestor(this)
inv_dwresize.of_SetOrigSize(this.width, this.height)
inv_dwresize.of_SetMinSize(this.width, this.height)
szObjects = this.Describe("datawindow.objects")
szObject = f_get_token(szObjects,"~t")
DO WHILE szObject <> '' // Register each object for resizing
szType = UPPER(this.describe(szObject + ".type"))
CHOOSE CASE szType
CASE "TEXT","GROUPBOX","COMPUTE","COLUMN","BUTTON","RECTANGLE", "PICTURE", "BITMAP"
inv_dwresize.of_register(szObject, 'Scale')
END CHOOSE
szObject = f_get_token(szObjects,"~t")
LOOP