English 中文(简体)
单观习俗集团增长
原标题:nstableview custom group row

I m 形成一种基于观点的表层观点,Im 出现某种麻烦,形成一个习惯集团。 我想在我的集团行文中写出文字,而缺省行为 Apple果是巨大的,但我需要改变实际行文的颜色和表面。 我已经下级了<代码>NSTableRowView,但不幸的是,它运作良好。 具体来说,在开始浮标时,我就没有说明如何改变观点的字母顺序,同时又不改变文字。

最佳回答

It s actually pretty easy. Make a new subclass of NSTableRowView and override the method drawRect:. It s best to always call [super drawRect:dirtyRect]; at the beginning. Then you have the property self.isGroupRow. If it is, then just draw your custom group row.

You can load in the custom Row in the Table View delegate with the method tableView:rowViewForRow:. Just return an instance of it right there

问题回答

如果我正确理解你的问题,这一解决办法就应当为你工作:

视下一行是否为组组群而定。





相关问题
Taking picture with QTCaptureView

Is it possible to simply take a picture and save it somewhere using a QTCaptureView and Apple s built-in iSight? I ve seen lots of tutorials on recording video but none on simply taking a picture. Any ...

Controlling OSX windows

I m trying to control windows of a foreign OSX applications from my application. I d like to 1. move the windows on the screen 2. resize the windows on the screen 3. change the currently active window ...

objective-c: Calling a void function from another controller

i have a void, like -(void) doSomething in a specific controller. i can call it in this controller via [self doSomething], but i don t know how to call this void from another .m file. I want to call ...

NSUndoManager and runModalForWindow:

I have a simple Core Data app which displays a list of entities in the main window. To create or add new entities, I use a second modal window with a separate managed object context so changes can be ...

NSMutableArray values becoming "invalid"

I m trying to show a database information in a tableview and then the detailed information in a view my problem is as follow: I created a NSMutableArray: NSMutableArray *myArray = [[NSMutableArray ...

How to get a flash url in a webpage using a webframe?

As we know , When we load frame from webpage of safari, we will invoke the delegate methods of webkit informal protocol(WebFrameLoadDelegate): webView:didStartProvisionalLoadForFrame: webView:...

热门标签