Created
February 18, 2010 17:40
-
-
Save BlairDuncan/307878 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)_updateResizeCursor:(CPEvent)theEvent | |
{ | |
if(![_tableView allowsColumnResizing] || ![_tableView columnAutoresizingStyle]) | |
{ [[CPCursor arrowCursor] set]; | |
return | |
} | |
var mouseLocation = [self convertPoint:[theEvent locationInWindow] fromView:nil], | |
mouseOverLocation = CGPointMake(mouseLocation.x - 5, mouseLocation.y), | |
overColumn = [self columnAtPoint:mouseOverLocation]; | |
if (overColumn >= 0 && CGRectContainsPoint([self _cursorRectForColumn:overColumn], mouseLocation)) | |
{ | |
var tableColumn = [[_tableView tableColumns] objectAtIndex:overColumn], | |
width = [tableColumn width]; | |
if (width == [tableColumn minWidth]) | |
[[CPCursor resizeRightCursor] set]; | |
else if (width == [tableColumn maxWidth]) | |
[[CPCursor resizeLeftCursor] set]; | |
else | |
[[CPCursor resizeLeftRightCursor] set]; | |
} | |
else | |
[[CPCursor arrowCursor] set]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment