• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Text color of dragged rows in NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Text color of dragged rows in NSTableView


  • Subject: Text color of dragged rows in NSTableView
  • From: Saratchandra Kongara <email@hidden>
  • Date: Fri, 22 Nov 2002 11:02:29 -0500

Hello,
I am working on adding Drag N Drop support in my application. I have an
outline view and a table view. I like to drag rows in my table view and
drop them on to my outline view items. I have a little problem with my
implementation, the text color of the dragged rows (in the clipping) is
white sometimes and is barely visible. This behavior is random. The
text color keeps changing between black and white randomly. Here is the
code.

- (BOOL)tableView:(NSTableView *)tv writeRows:(NSArray *)rows
toPasteboard:(NSPasteboard *)pboard {
NSMutableArray *rowArray = [[NSMutableArray alloc] init];
NSEnumerator *enumerator = [rows objectEnumerator];
id object;

while(object = [enumerator nextObject]) {
int rowNumber = [object intValue];
[rowArray addObject:[[self tableDataSource]
objectAtIndex:rowNumber]];
}
NSData *data = [NSArchiver archivedDataWithRootObject:rowArray];
[pboard declareTypes: [NSArray arrayWithObjects:@"table_item", nil]
owner:self];
[pboard setData:data forType:@"table_item"];
[rowArray release];
return YES;
}

Any suggestions? Thanks.

Regards
Sarat
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: text encodings
  • Next by Date: RE: multiple componentsSeparatedByString
  • Previous by thread: Re: text encodings
  • Next by thread: Problems subclassing NSTextField
  • Index(es):
    • Date
    • Thread