Mailing Lists: Apple Mailing Lists

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

Re: Horizontal scroller in table view



Hello Christopher,

Thank you for your reply.

On Apr 23, 2005, at 12:32 AM, Christopher Hickman wrote:

I don't have a Mac to try this on, but unless I've melted my brain trying to
figure out the filtered references, this might do what you want (as long as
XCode respects @selector() in AppleScripts). It is probably pretty
expensive, so I would only run it once, and then change the size accordingly
if edits result in data being to large for the current one. This might not
work at all, but you'll get an idea of where to start looking. No promises.
:) Good luck.


set sizeList to the cell size of every cell of table column
"yourTableColumn" --gets a list of {width,height} lists
set widthList to item 1 of each item in sizeList --item 1 of {width,height}
is width
set sortedWidthList to (call method "sortedArrayUsingSelector:" of widthList
with parameter @selector(compare:))
set width of table column "yourTableColumn" to last item in sortedWidthList



I think that sortedArrayUsingSelector: will sort ascending. If I'm wrong,
try "first item in sortedWidthList" instead of last item. :)


Topher

-----Original Message-----
From: applescript-studio-bounces+tophu=email@hidden
[mailto:applescript-studio-bounces+tophu=email@hidden] On Behalf
Of Matt Neuburg
Sent: Friday, April 22, 2005 10:30 AM
To: Iyanaga Nobumi
Cc: email@hidden
Subject: Re: Horizontal scroller in table view



The horizontal scroller is not appearing because there is nothing to scroll
to. As you say, the column has the same width as the table view width. The
horizontal scroller appears only if the column (or the sum of all columns)
is wider than the table view width. There is no command that means "make
this column as wide as the widest string value in any of its cells" - the
column known nothing about the cells. If you want the column to be wider, it
is up to you to make it wider. m.



So, this would be the command meaning "make this column as was as the widest string value of this column"?


And where should I put this code? I make my table with the "append" command; should I place your code just after "append"?

Thank you again for your help!

Best regards,

Nobumi Iyanaga
Tokyo,
Japan

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden
References: 
 >RE: Horizontal scroller in table view (From: "Christopher Hickman" <email@hidden>)



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.