Programmatically add textview and label to nstableView using Cocoa
I have a NSTableView with multiple rows and just 1 column. I want to display table in following format:
----------------------------
| Label - 1 |
| |
| textxtview contents-1 |
| height 20 |
----------------------------
| Label - 1 |
| |
| textxtview contents-1 |
| height 40 |
----------------------------
The height of tex开发者_如何学Ct view should be fixed and its scrollable Label & text view text color should be different.
How do I programmatically add labels and textview and set the frames?
You maybe should take a look at NSCollectionView. That's easier to use as you can design the cell view in Interface Builder.
精彩评论