开发者

Programmatically add textview and label to nstableView using Cocoa

开发者 https://www.devze.com 2023-02-10 07:00 出处:网络
I have a NSTableView with multiple rows and just 1 column. I want to display table in following format:

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

精彩评论

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