Progress
Programming
Handbook
Overlaying Widgets on Browse Cells
One popular way to extend the functionality of an updatable browse is to overlay an updatable browse cell with another widget when the user enters the cell to edit it. For example, on ENTRY of a cell, you could display a combo box or a toggle box. The user selects an entry from the combo box, or checks the toggle box, and you use those values to update the SCREEN–VALUE attribute of the browse cell. The values get committed or undone along with the rest of the row.
NOTE: This technique is especially effective in graphical interfaces.There are two problems to overcome. The first is in calculating the geometry to let you precisely position the overlay widget. You do this by adding the X and Y attributes of the browse cell to the X and Y attributes of the browse and assigning the result to the X and Y attributes of the overlay widget.
Next, you may need to move the overlay widget if the user accesses the scrollbar. A trigger on the SCROLL–NOTIFY event notifies you when the user scrolls, and you can update the X and Y positioning accordingly.
The code example below overlays a toggle box on the backorder field of the order–line table of the sports database.
This code also enables the THREE–D attribute on the parent frame, which provides a better contrast between the cell and the overlay widget, as the following screen shows:
![]()
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |