About user objects

Applications often have features in common. For example, you might often reuse features like the following:

  • A processing package that calculates commissions or performs statistical analysis

  • A Close button that performs a certain set of operations and then closes the window

  • DataWindow controls that perform standard error checking

  • A list that includes all departments

  • A predefined file viewer that you plug into a window

If you find yourself using the same application feature repeatedly, you should define a user object: you define the user object once in the User Object painter and use it as many times as you need.

There are two main types of user objects: class and visual. Class user objects are also called nonvisual objects.

Examples of user objects

The PowerBuilder Code Examples contain many interesting user objects in PBEXAMUO.PBL. Take a look at them to get an appreciation for the power of user objects.