开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜