Schultz’s PowerBuilder Notes

PFC DataWindow Resize Service


Resizes the objects within a DataWindow object including:

  • columns
  • computed fields
  • bitmaps
  • text

Doesn’t resize Composite or RichText Edit presentation styles. Used in conjunction with the window resize service, so when the window resizes the datawindow control, the controls within datawindow resize also.

The datawindow resize service is new to PFC 6.0

How do I turn the dw resize service on?

this.of_SetResize(TRUE)

this.inv_resize.of_SetMinSize(this.width – 50, this.height – 50)

How do I register datawindow columns?

of_register(object, “resize_type”)

of_register(object, (scale,) MoveX, MoveY, ScaleX, ScaleY)

  • object is control, column name or dwObject
  • Can’t use on composite DataWindows
  • Examples:

this.inv_resize.of_Register("create_oper_id",   100, 0, 0, 0)
this.inv_resize.of_Register("create_oper_id_t", 100, 0, 0, 0)
this.inv_resize.of_Register("create_phone",   100, 0, 0, 0)
this.inv_resize.of_Register("create_phone_t", 100, 0, 0, 0)
this.inv_resize.of_Register("suggestion_text", "Scale")
this.inv_resize.of_Register("suggestion_text_t", 0, 0, 100, 0)

Handy weighted resize chart:

MoveX, MoveY: what % should the control move

ScaleX, ScaleY: What % should the control scale

Scale Type

MoveX

MoveY

ScaleX

ScaleY

FixedToRight

100

0

0

0

FixedToBottom

0

100

0

0

FixedToRight&Bottom

100

100

0

0

ScaleToRight

0

0

100

0

ScaleToBottom

0

0

0

100

ScaleToRight&Bottom

0

0

100

100

FixedToBottom&ScaleToRight

0

100

100

0

FixedToRight&ScaleToBottom

100

0

0

100

Advertisements

July 3, 2008 - Posted by | 3. PFC, Datawindow Services | , , , ,

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: