Release 10.1A: OpenEdge Development:
Progress 4GL Handbook

> ## Creating and using dynamic browses

> Especially when you start using dynamic temp-tables and defining their fields at run time, you will want to be able to define a dynamic browse objects to display their contents. You can also use a dynamic browse if you have a dynamic query on a database table that isn’t known until run time, or anytime the column list of the browse needs to be definable at run time.

> Much like a dynamic temp-table, you define a dynamic browse in stages, first defining the browse object itself with the `CREATE BROWSE` statement, and then adding columns to it in separate statements.

> At run time, you can also add columns to a static browse control and define the query for a static browse.

> You create the browse with this statement:

>     CREATE BROWSE browse-handle [ IN WIDGET-POOL pool-name ]
>          [ ASSIGN attribute = value [ , ... ].

> As with other dynamic objects, if you don’t assign a value to the attributes in the `CREATE` statement you can set them later on using the browse handle.

> Attributes you can set for a dynamic browse include:

> - `X` and `Y`, or `COLUMN` and `ROW` — The position of the browse.

> - `WIDTH` — The width of the browse in characters.

> - `DOWN` — The number of rows to display in the browse viewport.

> - `TITLE` — A title for the browse object.

> - `FRAME` — The handle of the frame to parent the browse to.

> - `QUERY` — The handle of the associated query for the browse.

> - `SENSITIVE` — Set to true to enable the browse. Note that this attribute enables only the browse object itself, allowing the user to scroll and otherwise manipulate the browse. You enable individual browse columns separately.

> - `VISIBLE` or `HIDDEN` — Set `VISIBLE` to true to force the browse to be viewed. Set `HIDDEN` to false to make sure the browse is viewed when its container is viewed.

> - `READ-ONLY` — Set to true to make all columns read-only. Set to false to allow individual columns to be enabled.

> - `SEPARATORS` — Set to true to get lines between the browse columns.

> - `ROW-MARKERS` — Set to true to have row markers at the beginning of each row, or false to remove them.

> You must set a browse’s query handle before you can add columns to the browse, and you must parent it to a frame before you can visualize it.

> A dynamic browse always has the `NO-ASSIGN` quality, meaning that Progress is not able to automatically save changes you make to enabled columns in the browse. This is because the browse is completely defined at run time, and Progress can’t anticipate and supply default behavior for column assignment at compile time. However, in a distributed application you would never make direct changes to a database table from a browse anyway, so the utility of the static browse that can do auto-assignment of changes is very limited.

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