| Home | Previous Lesson: Context Sensitive Help For DataWindow Controls Next Lesson: Painting the Custom User Object |
A custom user object is created by grouping more than one control. For example, in the first version of our w_product_master window, we had a series of CommandButtons and a DataWindow control, but by using a custom user object, we could group all of them together. Once we have an object like that, we can use it anywhere in the application.
While painting custom user objects, you can insert another user object, and in fact other custom user objects also. This allows us to create any type of user object that we can think of, using objects offered by PowerBuilder, or any of the object that has been customized or inherited from the PowerBuilder parents.
In this session, let us create a custom user object using the CommandButton user object uo_CommandButton and user object uo_DataWindow. The reason we are using the previously created user objects is that we added some of the functionality that we need.
In the above object, we can display items on the left hand side DataWindow and allow the user to select and put the selected items in the basket (right hand side DataWindow).
It is based on a simple idea. The user highlights the entries that he is interested in and passes them over to the right hand side of the window. The user can also remove previous selections or pass all of the options from one side to the other at a click of a button. This is very useful because it allows you to include functionality that act upon the entries that appear in the list.
These types of windows are useful for multi-stage selections such as, when defining fields for a query or the sort order the query is supposed to use. You can also use this functionality to add addresses while creating the mail and so on.
| Home | Previous Lesson: Context Sensitive Help For DataWindow Controls Next Lesson: Painting the Custom User Object |