On 9/06/10 7:31 AM, "Gregory Lypny" <[email protected]> wrote:
> Hello everyone, > > When I import tab-delimited data files, I'd like to be able to set the tab > stops in a field so that each column displays its entire contents the way a > spreadsheet does when you size-to-fit. It's easy to loop through the lines of > the file to find the maximum number of characters in each column, but I'm not > sure how to convert that to tab stops in pixels. Any tips? Check out the dictionary entry for formattedWidth. If you're using a fixed width font then all you need to do is find the maximum length of each column and get the formatted width of the first word of that length. If not then do the same and then add a few pixels just to be safe. Terry... > > Gregory > > _______________________________________________ > use-revolution mailing list > [email protected] > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-revolution -- Dr Terry Judd | Senior Lecturer in Medical Education Medical Education Unit Faculty of Medicine, Dentistry & Health Sciences The University of Melbourne _______________________________________________ use-revolution mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
