KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Selecting the paper tray
PRODUCT: 4D | VERSION: 2003 | PLATFORM: Win
Published On: June 20, 2003
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

With 4D 2003 it is now possible to select the paper tray under Windows. It is common to show the current selected tray and give the user the ability to select from a list of available trays.

1) First, retrieve the paper tray values using the following statement:
RINT OPTION VALUES(Paper source option;namesArray;info1Array)

This command returns the names of the different trays available in namesArray, and returns their internal Windows ID numbers in info1Array.

2) Next, you can retrieve the current tray value using:

GET PRINT OPTION(Paper source option ;value1)

This returns the element ID of the array returned by the PRINT OPTION VALUES command for the paper tray that is used.

You can now display the list of available trays with the current tray selected in a combo box, pop-up menu or scrollable area. This would allow the user to select the tray of choice.

#3 Finally, set the option using the choice the user selected.

SET PRINT OPTION(Paper source option;UserSelectedValue)