From c48e2762b6906f4751f9918af379d01b42647e46 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Wed, 27 Oct 2010 18:00:30 +0000 Subject: =?UTF-8?q?=E2=80=A2=20added=20tooltip=20for=20header=20cell=20of?= =?UTF-8?q?=20Content=20and=20Custom=20Query=20table=20displaying=20the=20?= =?UTF-8?q?column=20name=20and=20field=20type=20-=20fixes=20issue=20875?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPCustomQuery.m | 1 + Source/SPTableContent.m | 1 + 2 files changed, 2 insertions(+) diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m index 02822f92..203f9ae6 100644 --- a/Source/SPCustomQuery.m +++ b/Source/SPCustomQuery.m @@ -1487,6 +1487,7 @@ [[dataCell formatter] setFieldType:[columnDefinition objectForKey:@"type"]]; [theCol setDataCell:dataCell]; [[theCol headerCell] setStringValue:[columnDefinition objectForKey:@"name"]]; + [theCol setHeaderToolTip:[NSString stringWithFormat:@"%@ – %@%@", [columnDefinition objectForKey:@"name"], [columnDefinition objectForKey:@"type"], ([columnDefinition objectForKey:@"char_length"]) ? [NSString stringWithFormat:@"(%@)", [columnDefinition objectForKey:@"char_length"]] : @""]]; // Set the width of this column to saved value if exists and maps to a real column if ([columnDefinition objectForKey:@"org_name"] && [(NSString *)[columnDefinition objectForKey:@"org_name"] length]) { diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m index a4cc0b74..bab3cf0d 100644 --- a/Source/SPTableContent.m +++ b/Source/SPTableContent.m @@ -434,6 +434,7 @@ // Set up the column theCol = [[NSTableColumn alloc] initWithIdentifier:[columnDefinition objectForKey:@"datacolumnindex"]]; [[theCol headerCell] setStringValue:[columnDefinition objectForKey:@"name"]]; + [theCol setHeaderToolTip:[NSString stringWithFormat:@"%@ – %@%@", [columnDefinition objectForKey:@"name"], [columnDefinition objectForKey:@"type"], ([columnDefinition objectForKey:@"length"]) ? [NSString stringWithFormat:@"(%@)", [columnDefinition objectForKey:@"length"]] : @""]]; [theCol setEditable:YES]; // Set up column for filterTable -- cgit v1.2.3