Release 10.1A: OpenEdge Development:
Progress Dynamics Advanced Development

> ## Building a custom super procedure for a browser

> Any Progress Dynamics object can have a custom super procedure, not just a viewer. To illustrate this, you can build one for a dynamic browser to do the same thing the first viewer example did: to highlight a browse cell if the balance is within $5,000 of the credit limit.

> Remember that there are only limited visual modifications that can be made to an individual browse cell on display of a particular row, including changing the background color, the font, or the format of the data. So for your purposes, the highlight action works well, since it changes the background color.

> You can move some of the same code from the viewer example to a custom super procedure for a browser. To the extent that the same actions apply, this code could be factored out all the way up to the level of the `datavis` or even the visual class, but you do not go that far in this example.

> To build the example, create a new structured procedure called `custbsuper.p`. First, it needs a local version of `initializeObject`. Like the first version of the viewer super procedure, this code assumes that it is serving only a single browser instance, so `initializeObject` stores attribute values locally for other functions to use. The code sets the `ScrollRemote` attribute in the browser to `TRUE`. This attribute causes the browser to define the internal procedure `rowDisplay` as a trigger procedure for the browser’s `ROW-DISPLAY` Progress event, which occurs each time a row of data is displayed to the browse widget. This event gives you the opportunity to intercept the display, check data values, and make limited changes (as noted above) to the cells in the browse.

> This section contains information on custom super procedures for browsers, including:

> - Useful browser properties

> - Coding the rowDisplay procedure

> - Creating the other support functions

> - Defining the custom super procedure for a browser

> - Changing browser attributes for the master and instance

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