Progress
Programming
Handbook


Locking Columns

You can use the NUM–LOCKED–COLUMNS attribute to prevent one or more browse columns from scrolling out of the browse viewport when the horizontal scrollbar is used. A non-horizontal-scrolling column is referred to as a locked column.

Locked columns are always the left-most columns in the browse. In other words, if you set NUM–LOCKED–COLUMNS to 2, the first two columns listed in the DEFINE BROWSE statement will be locked. In the example below, the customer number and name never move out of the browse viewport, no matter which of the remaining fields the user accesses with the horizontal scrollbar:

p-br12.p
DEFINE QUERY q1 FOR customer SCROLLING. 
DEFINE BROWSE b1 QUERY q1 DISPLAY cust-num name address address2 city 
    state postal-code country contact phone sales-rep credit-limit balance 
    ENABLE ALL WITH 10 DOWN SEPARATORS  
    TITLE "Update Customer". 
DEFINE FRAME f1 
    b1 
        WITH SIDE-LABELS AT ROW 2 COLUMN 10 NO-BOX. 
ASSIGN b1:NUM-LOCKED-COLUMNS = 2. 
OPEN QUERY q1 FOR EACH customer NO-LOCK. 
ENABLE ALL WITH FRAME f1. 
WAIT-FOR WINDOW-CLOSE OF CURRENT-WINDOW. 


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095