Newbie Question: Best view for list of strings?
Newbie Question: Best view for list of strings?
- Subject: Newbie Question: Best view for list of strings?
- From: James Farwell <email@hidden>
- Date: Sat, 22 Feb 2003 15:15:10 -0800
Greetings all,
I am writing an application that manages a list of strings controlled
by the user. The list is updated very frequently by user actions, and
the strings tend to be somewhat lengthy, like filenames. My initial
choice for the view to display the strings was a simple NSTableView
with a single column, but I'm having some problems getting the
horizontal scrolling to work intuitively. I want it to be so that the
horizontal scroll-bar allows the user to scroll to the end of the
longest string. However, to do this with an NSTableView, the best way
I have found is basically to calculate the width of every string in the
list using - sizeWithAttributes, and then calling - setWidth on the
column for every table reload. This seems rather inefficient so I was
wondering if anybody had any suggestions for a better view to use? I'm
not really using any particular properties of NSTableView, like column
ordering or anything, so maybe writing my own view would be easier?
Thanks!
- James
_______________________________________________
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.