Creating a component library which includes distinct elements
1) Open the "SCH Library" panel:




2) Add a new part(s) to your libaray:



Now there are two different parts ("Part A" and "Part B") listed under your components name:



Each of them has a different design screen. Click on the one you want to design. Design the two parts separately.

3) Assign which pin belongs to which part:

 

Notice that the pins 4 and 8 belong to both parts and always active. Pins 1, 2 and 3 are only active when Part A is selected. Pins 5, 6 and 7 are active only when Part B is selected. The pins of the non-selected part are always grayed out.

If the some of the pins do not match to their corresponding parts, alter the settings in the "Component Pin Editor" dialog box.





Change the pin order to state which pin belongs to which part.
1: Part A
2: Part B

That's all. Now we have two separate parts in one component library.