Class user objects  Building user objects

Chapter 14: Working with User Objects

Visual user objects

A visual user object is a reusable control or set of controls that has a certain behavior. You define it in the User Object painter, where you place controls in the user object and write scripts for those controls. Then you can place the user object as often as needed in windows you build in your applications.

The types of visual user objects are:

Custom visual user objects

Custom visual user objects are objects that have several controls that function as a unit. You can think of a custom visual user object as a window that is a single unit and is used as a control.

Suppose that you frequently use a group of buttons, each of which performs standard processing. If you build a custom user object that contains all the buttons, you can place the buttons in the window as a unit when you place the user object in a window.

Standard visual user objects

A standard visual user object inherits its definition from one standard PocketBuilder control. You modify the definition to make the control specific to your applications.

Suppose that you frequently use a CommandButton named Close to display a message box and close the parent window. If you build a standard visual user object that derives from a CommandButton to perform this processing, you can use the user object whenever you want to display a message box and then close a window.





Copyright © 2004. Sybase Inc. All rights reserved. Building user objects

View this book as PDF