Friday, July 20, 2018

#1 2004-02-04 04:56:19 pm

jmistler
Member
Registered: 2003-12-16
Posts: 18

Is there a command like "hide table column" in ASS

I have a preferences window that allows the user to put a check by the names of all of the possible columns to be displayed in the Main Table.  Is there a command like "hide table column" or some way to hide any columns that the user does not have checked in preferences?

I did get it to work by creating no table columns in IB, then adding them to the table as the user selects them in prefs.  However--without a column in IB to reference--applescript errors when the column is clicked by the user for sorting purposes.

Any ideas?

Thanks,

John

Offline

 

#2 2004-02-04 05:54:25 pm

jonn8
Member
From:: New York
Registered: 2003-05-01
Posts: 1766
Website

Re: Is there a command like "hide table column" in ASS

I'm sure there's a better way to do this but make your table in IB with all of the columns that could possibly be in it. Then to toggle visiblity, you can adjust the width of the columns as necessary, setting a width of 0 essentially makes it invisible:

Applescript:

tell window "main"
set the_table to table view 1 of scroll view 1
set old_width to width of table column 1 of the_table
set old_min_width to minimum width of table column 1 of the_table
set minimum width of table column 1 of the_table to 0
set width of table column 1 of the_table to 0
update
delay 2
set width of table column 1 of the_table to old_width
set minimum width of table column 1 of the_table to old_min_width
end tell

Jon

Offline

 

#3 2004-02-14 06:14:21 pm

petey
Member
Registered: 2003-12-08
Posts: 45

Re: Is there a command like "hide table column" in ASS

I'm sure there's a better way to do this but make your table in IB with all of the columns that could possibly be in it. Then to toggle visiblity, you can adjust the width of the columns as necessary, setting a width of 0 essentially makes it invisible"



I wish there were a better way of doing it.  I have a number of columns I need to toggle between visiblity and invisibility,  but zero width columns unfortunately still take up a small amount of width, and throw my horizontal spacing off visually.

Offline

 

#4 2007-08-20 05:43:54 am

DougAdams
Member
From:: Newton, MA, USA
Registered: 2003-05-09
Posts: 81
Website

Re: Is there a command like "hide table column" in ASS

Set the minimum widths and widths to a negative number. -3 seems to work when vertical lines are used.


Doug

Offline

 

#5 2010-09-02 08:44:58 pm

ihaveabellybutton
Member
Registered: 2004-10-02
Posts: 41

Re: Is there a command like "hide table column" in ASS

http://osdir.com/ml/applescript-studio/ … 00013.html

Applescript:

call method "setHidden:" of theTableColumn with parameter true

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)