Progress
Programming
Handbook
Sizing a Browse and Browse Columns
Normally, the browse calculates its size based on the column width of each field and the number of display rows requested with the DOWN option. If the resultant browse is too big for the frame, Progress displays an error message at compile time.
Use the DOWN option to specify the number of rows to display and the WIDTH option to specify the width of the browse. If the total column width is wider than the specified browse width, the browse displays a horizontal scrollbar to access the columns that don’t display initially, and you avoid the compilation error.
NOTE: In character interfaces, there is no horizontal scrollbar for a wide browse, but you can scroll the browse one column at a time, using CURSOR–LEFT and CURSOR–RIGHT.The horizontal scrollbar can work in two different ways. By default, the browse scrolls whole columns in and out of the viewport. To change this behavior to pixel scrolling, specify the NO–COLUMN–SCROLLING option of the DEFINE BROWSE statement or set the COLUMN–SCROLLING attribute to NO.
You can also use the SIZE phrase to set an absolute outer size of the browse in pixel or character units and Progress will determine how many rows and columns can be displayed. (Note that the User Interface Builder uses the SIZE phrase.)
The browse also supports a column WIDTH option. Use this option to set the width of individual columns. When a column WIDTH option sets the width of an updatable column smaller than the size specified by the FORMAT string, the browse cell will scroll to accommodate extra input up to the size specified by FORMAT.
The example below uses the WIDTH option on each column to set the desired column width and the WIDTH option with the DOWN option to size the browse as a whole:
When you run this example, the following browse appears:
![]()
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |