Universal Smart Panel (USP)

This Smart Panel has flexible set of parameters and allows you to decrease essentially the number of different panels inside your application.

What is it for ?

Once upon a time you began developing a big Progress Application using Progress Smart Objects. Some time later you could see a tremendous number of Smart Panels inside your application. They are similar to each other but every one has own  traits - number of buttons, button's label (help, tooltip), event generated by button etc... Besides this, you have to include in some panels the methods to control their run-time behavior and appearance. Sometimes you want your panel communicate to its container, sometimes it would be better if some neighbour on the container page could hear from it. USP can do all these things for you.
USP bases on Standard Progress Smart Panel and uses some its code with small changes, for example procedure set-size.

 USP Basics

The main features of USP are as follows: Explanation for terms 'USP type' and 'USP button role':
USP type Determines the default set of roles, Smart Links along which USP can communicate to other Smart Objects, internal states (such as 'add only', 'initial', ...) and rules to set correspondence between these states and external states received via procedure state-changed
USP button role Set of button's attributes which determine its appearance and behavior: Label, Help, Event (such as 'update-record', 'cancel-record',...), etc..
There are five USP type now.
Control Works with Smart Objects which do not require TableIO link
Table (Update) Works with Smart Objects which require TableIO link and have enabled fields whose initial state is disable
Table (Save) Works with Smart Objects which require TableIO link and have enabled fields which are enable all along
Transition Works with Smart Container to allow walking through container from the first page to the last one and back (when we do not want to use Smart Folder for some reasons)
Level Works with multi-level Smart Browser

USP attributes

Attribute dialog

This is dialog that you can see in UIB when you select 'Instance Attributes' from context menu for USP instance.

Widget description

Field-level widgets
Browser ‘Buttons’
Browser ‘State’

Field-level widgets

Widget Comment
Panel Select USP type  (Control, Table (Save), Table (Update), Transition,Level)
Link Smart Link that USP uses to communicate to other Smart Objects
Border Like as standard TableIO panel
Language Two languages are supported now for Labels and other texts in panel: Russian and English
Communication method You can select either notify or new-state procedure to notify recipients about user actions. You can specify as recipient either container or other Smart Object linked to USP.
Appearance When you select Graphic you get bitmap representation of buttons instead text labels
Font Progress font number used for text labels
Extra parameter Some of USP types can have additional parameters. For example, Transition panel has an attribute 'Number of pages
‘Default’ (on the top) apply role defaults to current button
‘Reset’ (on the top) return to initial button's parameters
‘Add’ add button with initial role 'custom'
‘Delete’ delete current button
Browser ‘Buttons’ every line describes one button in panel
Browser ‘State’ every line describes overrides by panel  internal state for current button in Browser ‘Buttons’
Button ‘Default’ (on the bottom) apply defaults for the whole panel
Button ‘Reset’ (on the bottom)