![]() ![]() I recommend a little app called Cocoa Browser - you can easily access all classes and see the hierarchy. Try NSScrollView’s - (void)setDrawsBackground:(BOOL)flag to NO, so it doesn’t draw the background at all (then it should be transparent). Now it remains a mystery why you got your backround black. NSOutlineView is a subclass of NSTableView. NSTableView is a view inside a NSScrollView. In Interface Builder, select the Classes tab, then select the table view in your window. I’ll have to make a dictionary inside the data source or somesuch rather than checking control values by tag at panel close… Making a wrapper data source to process an [[NSImage, NSString and NSNumber (tabled pop-ups need an index, it seems) appears to work otherwise. ![]() I also have to double-click on the text field to edit it, since I’m working on disabling row selection behavior, which I don’t need. I also get a compiler warning, but I can insert a typecast or store the superview in a temp variable to get around that. …but the table gets a solid black background, just like if I set a 0% opacity color in IB. [[NSTableView’s cells provide the controls I need without inventing my own NSView s to embed in each row.Īlso, did you mean NSScrollView rather than NSOutlineView for the NSTableView’s container? I added the following to my code to try to make the table transparent… The example you linked to seems to be overkill for my needs. Remember that the control is not autoreleased, you need to release it on dealloc. NSButton *button = initWithFrame:rect] set all you need (like style, etc.) then, use panel contentView] addSubview:button] to add the control to the view. If you don’t want to go through this, you’ll need to be creating new controls. ![]() You’ll need to set the NSOutlineView’s background color to, as well as the NSTableView (the table view is inside the outline view). Anybody successfully solved this problem?Īctually, you do use NSTableView. I’ve tried searching through Apple’s mailing list archives, but only found one other reference to this problem, and nobody provided assistance to the person who brought it up. I haven’t been doing much Cocoa development for long, but this is making me wonder if I have to hard-code some functionality instead of GettingItForFree. ![]() (They don’t support MenuSeparators, and they have text selection behavior I don’t want.) I also tried using NSComboBox es, which do matrix, but they don’t work the same. At first, I suspected that this class isn’t implemented using NSCell s, but both IB’s class browser and AppKiDo are reporting that there is a NSPopUpButtonCell implemented. While I can make multiple NSImageView s and NSTextField s, IB simply beeps when trying to drag the pop-up. I’ve been trying to use parallel NSMatrix s by option-dragging in InterfaceBuilder, and using the YSpacing to line the rows up. (It always drew a solid color behind it.) I originally thought about using an NSTableView, but I couldn’t figure out how to make it transparent. Think of how iConquer’s ( ) player name collection dialog looks for an example… I want each row to contain an NSImageView, an NSTextField, and an NSPopUpButton. I want this sheet to allow n-number of rows of NSControl s to be generated to collect information from the user. I’m trying to make a NSPanel as a sheet that appears when a new NSWindow is opened. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |