ThaiPBL.com

PowerBuilder Library Thailand

อีเมล พิมพ์ PDF

การกำหนดขนาด paper size ที่ไม่มีในรายการให้เลือก

จริงๆ แล้วก็เอามาจาก help แหละครับ แต่อาจจะหาลำบากนิดนึง
ตามนี้ครับ
To specify a user-defined paper size at runtime,
set the Paper.Size property to 256,
then set the Print.CustomPage.Length and
Print.Custom.Page.Width properties to the desired size in millimeters.
These properties cannot be set in the painter.
For example:

dw_1.Object.DataWindow.Print.Paper.Size = 256
dw_1.Object.DataWindow.Print.CustomPage.Length = 254 //10 inches
dw_1.Object.DataWindow.Print.CustomPage.Width = 190.5 //7 inches

ขยายความเป็นไทยนิดนึง ก็คือ หากต้องการกำหนดขนาด paper size เอง  ก็ต้อง set ค่า อย่างที่บอกครับ
คือ ต้องกำหนดให้ Paper.Size = 256
และต้อง กำหนด ความกว้างและความยาว เอง เป็นหน่วย มม.ครับ    และต้องเขียนเป็น script ไม่สามารถกำหนดในหน้าออกแบบได้ครับ