• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Newbie Question: Best view for list of strings?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Newbie Question: Best view for list of strings?
      • From: Chris Giordano <email@hidden>
  • Prev by Date: Re: Trouble
  • Next by Date: Re: Enumerating Address Book properties
  • Previous by thread: Re: Getting the current state of the modifier keys
  • Next by thread: Re: Newbie Question: Best view for list of strings?
  • Index(es):
    • Date
    • Thread