Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Add dynamically tool tip in NSMatrix



Hello,

Something goes wrong with my dynamically add of tool tip text :
I have an NSMatrix of text fields (several rows, only one column)
where each tool tip cell text depends on several conditions.
For that i use :

[[modalField superview] addToolTipRect:[modalField frame] owner:self userData:nil];

where modalField is the matrix that contains the text field cells.
To choose the appropriate tool tip's text for each cell i use that :

- (NSString *)view:(NSView *)view stringForToolTip:(NSToolTipTag)tag point:(NSPoint)point userData:(void *)data
{
int row, column;
if ([modalField getRow:&row column:&column forPoint:point])
{
NSLog(@"Value of row : %d ", row);
}
else
NSLog(@"Not found");
}

The problem is i always have the "Not found" message each time mouse enter in a cell of the modalField matrix.
Because of that i'm not able to choose which tool tip text should be associated to the pointed cell.
Any idea ?

Thx a lot.
K.
_______________________________________________
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.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.