แค่เว็บๆหนึ่ง ! ที่อยากเก็บประสบการณ์
Home
 

Powerbuilder Resizing the Controls Automatically

Resizing the Controls Automatically

We can make w_product_master window more useful, by simply resizing the DataWindow controls whenever the user resizes the window. To do this, we have to add some code to the resize event of the w_product_master:

// Object: w_product_master
// Event: Resize

dw_query.x = 10
dw_query.y = 10
dw_query.Width = WorkSpaceWidth() – 20
dw_query.Height = WorkSpaceHeight() – 20

dw_product.x = dw_query.x
dw_product.y = dw_query.y
dw_product.Width = dw_query.Width
dw_product.Height = dw_query.Height

We are using the WorkSpaceWidth() and WorkSpaceHeight() functions to determine the width and height of the workspace and then to resize the controls, leaving a border of 10 units around the DataWindow controls.

credit : http://powerbuilder.hyderabad-colleges.com/Advanced-PowerBuilder-2-10-90.html

Off 

November 11, 2013 This post was written by Categories: เรื่องเล่ารายวัน No comments yet


Top