Created
December 28, 2009 22:05
-
-
Save themusicman/264984 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
leftSideBounds = [leftSideOfSplitView bounds]; | |
tableScrollView = [[CPScrollView alloc] initWithFrame:CGRectMake(0, 0, leftSideBounds.size.width, leftSideBounds.size.height)]; | |
[tableScrollView setAutoresizingMask:CPViewWidthSizable | CPViewHeightSizable]; | |
[tableScrollView setAutohidesScrollers:YES]; | |
[leftSideOfSplitView addSubview:tableScrollView]; | |
scrollBounds = [tableScrollView bounds]; | |
tableView = [[CPTableView alloc] initWithFrame:CGRectMake(0, 0, scrollBounds.size.width, scrollBounds.size.height)]; | |
[tableView setAutoresizingMask:CPViewWidthSizable | CPViewHeightSizable]; | |
[tableView setUsesAlternatingRowBackgroundColors:YES]; | |
[tableView setDataSource:self]; | |
var headerColor = [CPColor colorWithPatternImage:[[CPImage alloc] initWithContentsOfFile:[[CPBundle mainBundle] pathForResource:@"button-bezel-center.png"]]]; | |
[[tableView cornerView] setBackgroundColor:headerColor]; | |
var propertyColumn = [[CPTableColumn alloc] initWithIdentifier:@"propertyName"]; | |
[[propertyColumn headerView] setStringValue:"Property Title"]; | |
[[propertyColumn headerView] setAutoresizingMask:CPViewWidthSizable | CPViewHeightSizable]; | |
[[propertyColumn headerView] setBackgroundColor:headerColor]; | |
[propertyColumn setWidth:scrollBounds.size.width - 15]; | |
[tableView addTableColumn:propertyColumn]; | |
[tableScrollView setDocumentView:tableView]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment