skip to main content
OpenEdge Development: ADM and SmartObjects
SmartObjects : SmartPanels
 
SmartPanels
SmartPanels are ADM panel‑class SmartObjects that group a number of functionally related buttons onto a frame. The ADM provides separate SmartPanel masters that support specific types of record‑management activities, as follows:
*Navigation SmartPanel masters support navigating records. There are two Navigation SmartPanel masters: an Icon SmartPanel master that contains buttons using icons to indicate the navigation direction and a Labels SmartPanel master that uses text labels instead of icons. You link instances created from these masters to one or more SmartDataObjects with Navigation SmartLinks.
*The Update SmartPanel master supports modifications to database records. It runs in either save or update mode. You link an instance created from this master to one or more updateable objects, such as SmartDataViewers or SmartDataBrowsers, with TableIO SmartLinks.
*The Commit SmartPanel master supports committing multiple updates to database records in a single transaction. You link an instance created from this master to one or more SmartDataObjects with Commit SmartLinks.
For more information about using SmartPanels to manage records in the ADM, see Chapter 4, “Data Management in the ADM.”
Table 2–9 lists SmartPanel files.
 
Table 2–9: SmartPanel files
File type
Filename / SmartLinks
Master files
(Because SmartPanels are customized at design time, a template is not necessary.)
src/adm2/pnavico.w
(source code for Navigation with Icons master)
gui/adm2/pnavico.r
(compiled code for Navigation with Icons master)
src/adm2/pnavlbl.w
(source code for Navigation with Labels master)
gui/adm2/pnavlbl.r
(compiled code for Navigation with Labels master)
src/adm2/pupdsav.w
(source code for Update master)
gui/adm2/pupdsav.r
(compiled code for Update master)
src/adm2/pcommit.w
(source code for Commit master)
gui/adm2/pcommit.r
(compiled code for Commit master)
Primary include file
src/adm2/panel.i
ADM/Progress Advisor‑ supported SmartLinks
Commit-Source (pcommit.w)
Navigation-Source (pnavico.w and pnavlbl.w)
TableIO-Source (pupdsav.w)
Instance properties dialog boxes
src/adm2/support/n-paneld.w (source code for Navigation with Icons and Navigation with Labels panels)
gui/adm2/support/n-paneld.r (compiled code for Navigation with Icons and Navigation with Labels panels)
src/adm2/support/u-paneld.w
(source code for Update panel)
gui/adm2/support/u-paneld.r
(compiled code for Update panel)
SmartPanel instance properties
Navigation and Update SmartPanels have instance properties dialog boxes but the Commit SmartPanel does not. This is because Commit SmartPanels do not have any instance properties.
Navigation SmartPanel instance properties
Figure 2–7 shows the instance properties dialog box for a Navigation SmartPanel.
Figure 2–7: Navigation SmartPanel Attributes dialog box
You use the instance properties in this dialog box as follows:
*Show Border — This specifies whether to create a decorative rectangular border around the SmartPanel.
*Edge Pixels — If positive, this value specifies the width of the decorative rectangular border to be created with Show Border. Setting it to zero removes the border.
*’First’ on Left, ‘First’ on Right — These determine the actions associated with the navigation radio buttons. If you specify ‘First’ on Left (the default), the radio buttons perform Get-First, Get-Prev, Get-Next, and Get-Last actions in order from left to right. If you specify ‘First’ on Right, the order of these actions is reversed: the radio buttons perform Get-First, Get-Prev, Get-Next, and Get-Last actions in order from right to left.
Note: The ‘First’ on Left and ‘First’ on Right properties are enabled for the Icons version of the Navigation SmartPanel master (p-navico.w) but not the Labels version (p-navlbl.w).
Update SmartPanel instance properties
Figure 2–8 shows the instance properties dialog box for an Update SmartPanel.
Figure 2–8: Update SmartPanel instance properties dialog box
You use the instance properties in this dialog box as follows:
*Show Border — This specifies whether to create a decorative rectangular border around the SmartPanel.
*Edge Pixels — If positive, this specifies the width of the decorative rectangular border. Setting this value to zero removes the border.
*Save, Update — This specifies whether the Update SmartPanel is run in Save mode or Update mode. For descriptions of these modes, see the “Update SmartPanel” section.
*Add One Record, Add Multiple Records — This specifies whether the SmartPanel’s Add button prompts the application user for a single new record or multiple new records at run time.
SmartPanel usage notes
This section discusses special programming considerations for using SmartPanels.
Resizing SmartPanels at design time
SmartPanel instances are resizable at design time. All buttons are resized and reconfigured by the resizeObject procedure in the panel.p file. You can make SmartPanel buttons larger or smaller, rearrange them in rows, or make their display vertical instead of horizontal. Buttons you add to a SmartPanel are automatically resized with the other buttons.
SmartPanels as toolbars
In prior ADM releases, a common way to provide toolbar‑type functionality in Progress applications was to use a Navigation SmartPanel and an Update SmartPanel collectively as a sort of toolbar. If the containing SmartObject is a SmartWindow, this is no longer necessary, as you can use a SmartToolbar instead: a SmartObject that provides a toolbar and/or menu interface to application commands such as running other windows or procedures or performing navigation and transaction actions in the current object. For details, see the “SmartToolbars” section.