scrollRowToVisible and NSTableView
scrollRowToVisible and NSTableView
- Subject: scrollRowToVisible and NSTableView
- From: Chad Armstrong <email@hidden>
- Date: Thu, 16 Jan 2003 22:15:02 -0700
Hello,
I'm writing an application which uses a NSTableView, and when too many
items fill up the table and the scroll bar appears, I want the table to
shift to the last item (or the last item which was put in). I found
some code, however it seems to shift to the item just ABOVE the one I
want. And if I try and shift by 1, it does nothing, or just jumps to
the top. Here is the example code:
- (IBAction) addNewItem:(id) sender
{
[myStuff addObject: [inputField stringValue];
[inputField setStringValue: @""];
[table scrollRowToVisible: [myStuff count] - 1];
[table reloadData];
}
Is there another and better way about doing this, or is there some fault
with either Cocoa or my code? This was programmed under OS 10.2.3 with
PB 2.0.1 (Jully 2002 Developer Tools).
Also, I've read that there are November or December tools available. Is
there any benefit for me to get those tools over the ones I have right
now?
Regards,
Chad Armstrong
email@hidden
_______________________________________________
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.