| Home | Previous Lesson: Custom User Objects Next Lesson: Creating Functions For the Custom User Object |
We are going to paint a custom user object uo_shuffle_rows_between_2_dws. Invoke the user object Painter and double click on 'Custom Visual' icon.
Insert a user object by selecting 'Insert > Control > User object' menu option and selecting the user object uo_DataWindow from the list and click on the workspace. Name this as dw_left. Follow the same steps and insert one more, and name it as dw_right. Make sure that you place it on the right side of dw_left.
Similarly insert the user object uo_CommandButton and place it between two DataWindow controls. Name this as cb_transfer_to_right. Insert one more and place below the first one and name it cb_transfer_to_left. Place one more below the dw_left DataWindow and name it as cb_select_all. Place one more below the dw_right DataWindow and name it as cb_deselect_all.
You can see that the ue_shiftclicked event is the ancestor script for the DataWindow control. This is object oriented design working in practice; when you placed uo_DataWindow control in the window, you are creating a new control which is inherited from the uo_DataWindow, that means the new DataWindow controls (dw_left and dw_right) gained all the functionality of the previously defined user object (uo_DataWindow). That means that we don't have to write the same code over and over again.
| Home | Previous Lesson: Custom User Objects Next Lesson: Creating Functions For the Custom User Object |