PDA

View Full Version : Creating New User control




satyam90
Nov 5, 2008, 04:44 AM
I want to create a new user control which has a image(png format), and 3 or 4 strings. All the details related to image and strings are available in a class which is holding by NSArrayController.
My class details are something like Name of employee, his image, employee ID, Department name, project, etc. In that control some of these details are to be shown.

Now I want to have this control available in NSOutlineView. The root element will be name of the Department and sub roots will be name of project. Under project sub root, all the employees details have to be shown in 2 or 3 columns (depending on main window size)

First of all I would like to create user control which holds the image and needed details. Can some one guide me in achieving this? How to create a new control, from which parent my control must inherit, how to distribute it while packaging etc.....



kainjow
Nov 6, 2008, 08:04 AM
If you're using this inside an NSOutlineView as a control inside a row, you will want to subclass NSCell (or one of its subclasses).