#!/bin/sh # MetaCard 2.4 stack # The following is not ASCII text, # so now would be a good time to q out of more exec mc $0 "$@"  altFldHeader1non openStack if word 1 of the systemVersion is "NT" and word 2 of the systemVersion > 5 then put queryRegistry("HKEY_CURRENT_USER\Control Panel\Colors\MenuBar") into tColor if tColor <> "" then put word 1 of tColor,word 2 of tColor,word 3 of tColor into tColor set the backgroundColor of this stack to tColor end if end if end openStack d  @Ums sans serif UVerdanaUVerdanaWVerdanaUms sans serifUVerdanaWVerdana Wms sans serif cREVGeneralscriptChecksumtl1Ipv bookmarks handlerList openStackscriptSelectionchar 351 to 350 prevHandler mouseDown tempScriptscript

on openStack

if word 1 of the systemVersion is "NT" and word 2 of the systemVersion > 5 then

put queryRegistry("HKEY_CURRENT_USER\Control Panel\Colors\MenuBar") into tColor

if tColor <> "" then

put word 1 of tColor,word 2 of tColor,word 3 of tColor into tColor

set the backgroundColor of this stack to tColor

end if

end if

end openStack

 P)on mouseDown put "test" end mouseDown d cREVGeneralscriptChecksum^`h$]}L bookmarks handlerList mouseDownscriptSelection char 40 to 39 prevHandler resizeStack tempScriptscript

on mouseDown

put "test"

end mouseDown

 altFldHeader04 # # ___ __ ____________ ___ __ _________ ___ _______ # / _ | / //_ __/ __/ / / _ \/ // / __/ _ | / _ \/ __/ _ \ # / __ |/ /__/ / / _// /__/ // / _ / _// __ |/ // / _// _/ # /_/ |_/____/_/ /_/ /____/____/_//_/___/_/ |_/____/___/_/|_| # # ------------------------------------------------------------------------------------------------------------ # Control: altFldHeader # by Chipp Walters, Altuit, inc. # # Instructions for Use: # # The altFldHeader is a group control which is linked to a field. The user can resize the stack window and the column buttons and linked field columns will resize automatically. You can also interactively place the cursor between buttons, click and drag to resize a column. Columns can be set with a minimum size which they can shrink to. # # Features: # The Field Header buttons can be enabled to do sorts etc.. # Realtime column tracking can be on or off. # Minimum Field widths can be set. # Header and Field resize with stack # Specified Fields can be set to never resize # # How to use: # # You may edit the group "altFldHeader" to add or delete buttons. # Just copy and paste one of the existing buttons. # You may also edit the altMinWidth custom property of each button # to set the minimum resize width in pixels. # # There is no maximum limit for the number of buttons. # You need to use at least 2 buttons for this control to work. # Once your finished setting and naming your buttons, press the "Init Grp" button. # You needn't set up your buttons perfectly as the InitAltFldHeader handler # will do this automatically for you. # # You may put a mouseUp handler in any of the button scripts, # but please put "pass mouseUp" in the handler so the control can manage the hiliting. # Make sure and set the altEnableBtn property to true for the button the script is in. # # You'll need to copy the image "moveColumn" to your stack (upper left). Don't rename it. # It's used as an icon resource. # # Here are the custom properties for the group "altFldHeader". # Please do not set the one marked "used internally" # # altTrackMode -used internally # altLeftButPad - the distance in pixels which the left group boundary sets from the leftmost button # altBtnIDs -used internally # altRightButPad - the distance in pixels which the right group boundary sets from the rightmost button # altLeftMargin - the distance in pixels the group sets from the left of the stack # altTargetField - the name of the associated field # altTopButPad - the distance in pixels which the top group boundary sets from the top of the buttons # altMovingNow -used internally # altRightMargin- the distance in pixels the group sets from the right of the stack # altMoveColumn -used internally # altBotButPad - the distance in pixels which the bottom group boundary sets from the bottom of the buttons # # Here are the custom properties for the buttons. Please do not set the one marked "used internally" # # altDontResize - set to true if you want the field to always have a fixed width (as set by altMinWidth) # altEnableBtn - set to true if you wish to enable the button visual animation. Make sure and put a "pass mouseUp" in your "on mouseUp" handler for this to work. Even when set to false, button handlers will execute, this property only effects the up / down animation for the button. # altMinWidth - the minumum width in pixels the column can ever shrink to. Also used by the InitAltFldHeader for setting the width of a button when the altDontResize property is set to true. # altOrder -used internally # # Notes: # # 1) It's important that the backgroundBehavior of grp "altFldHeader" be set to true so the group receives the resize command. # 2) All scripts are located inside the group "altFldHeader" # ------------------------------------------------------------------------------------------------------------ on mouseDown if the cursor is (the id of img "moveColumn") then lock cursor set the altMovingNow of me to "" put the altOrder of the target into x if mouseH() < item 1 of the loc of the target then #other button on left put line x-1 of the altBtnIDs of me into line 1 of temp put line x of the altBtnIDs of me into line 2 of temp else #other button on right put line x of the altBtnIDs of me into line 1 of temp put line x + 1 of the altBtnIDs of me into line 2 of temp end if set the altMovingNow of me to temp set the altMoveColumn of me to true else if the target contains "button" then if the altEnableBtn of the target then set the hilite of the target to true end if end if end mouseDown on mouseUp set the altMoveColumn of me to false unlock cursor if the target contains "button" then if the altEnableBtn of the target then set the hilite of the target to false end if altFinishTracking end mouseUp on mouseEnter x,y if the target contains "button" then lock cursor set the altTrackMode of me to true end if end mouseEnter on mouseLeave unlock cursor set the altTrackMode of me to false end mouseLeave on mouseRelease unlock cursor set the hilite of the target to false set the altMoveColumn of me to false altFinishTracking end mouseRelease on mouseMove x,y if the altTrackMode of me then if the target contains "button" and the altDontResize of the target is False then switch case x < (the left of the target + 5) and the altOrder of the target > 1 #other button on left # gets the btn id of the 'adjacent' button put (item 1 of line (max((the altOrder of the target - 1),1)) of the altBtnIDs of me) into tBtnID if the altDontResize of btn ID tBtnID then set the cursor to hand else set the cursor to (the id of img "moveColumn") end if break case x > (the right of the target - 5) and the altOrder of the target < the number of lines in the altBtnIDs of me #other button on right # gets the btn id of the 'adjacent' button put (item 1 of line (min((the altOrder of the target + 1),the number of lines in the altBtnIDs of me)) of the altBtnIDs of me) into tBtnID if the altDontResize of btn ID tBtnID then set the cursor to hand else set the cursor to (the id of img "moveColumn") end if break default set the cursor to hand end switch else set the cursor to hand end if end if if the altMoveColumn of me then put the altMovingNow of me into tList set the width of btn id item 1 of tList to \ min(max(x - the left of btn id item 1 of tList,item 3 of tList),(the right of btn id item 1 of line 2 of tList - the left of btn id item 1 of tList - item 3 of line 2 of tList)) put the right of btn id item 1 of line 2 of tList into tRight get the rect of btn id item 1 of line 2 of tList set the rect of btn id item 1 of line 2 of tList to \ the right of btn id item 1 of tList, \ item 2 of it, \ item 3 of it, \ item 4 of it if the altRealTimeTracking of me then altFinishTracking end if end mouseMove on resizeStack get the rect of this cd put item 3 of it into tRight put the left of me into tL set the width of me to tRight-the altRightMargin of me - the altLeftMargin of me put the width of me-the altLeftButPad of me-the altRightButPad of me into tWidth put tL + the altLeftButPad of me into tL repeat for each line L in the altBtnIDs of me set the left of btn id (item 1 of L) to tL if the altDontResize of btn id (item 1 of L) is False then set the width of btn id (item 1 of L) to max(round(tWidth * item 2 of L),the altMinWidth of btn id (item 1 of L)) end if put the right of btn id (item 1 of L) into tL end repeat set the width of btn id item 1 of last line of the altBtnIDs of grp "altFldHeader" to \ the right of grp "altFldHeader" - the altRightButPad of grp "altFldHeader" \ - the left of btn id item 1 of last line of the altBtnIDs of grp "altFldHeader" put 0 into tW set the lockLoc of fld the altTargetField of grp "altFldHeader" to true if the vscrollbar of fld the altTargetField of grp "altFldHeader" then put the scrollbarwidth of fld the altTargetField of grp "altFldHeader" into tW end if set the width of fld the altTargetField of grp "altFldHeader" to \ the width of grp "altFldHeader" + tW altFinishTracking end resizeStack on altFinishTracking #set the tabs for the associated field put the left of btn id item 1 of the altBtnIDs of me into tLeft repeat for each line L in the altBtnIDs of me put the right of btn id item 1 of L - tLeft & "," after tTabs end repeat delete last char of tTabs set the tabStops of fld the altTargetField of me to tTabs #set the new button percentages put the altBtnIDs of me into tList put (the width of me - the altLeftButPad of me - the altRightButPad of me) into tWidth put 0 into tLength repeat with x = 1 to the number of lines in tList put round(100*the width of btn id item 1 of line x of tList/tWidth)/100 into \ item 2 of line x of tList if x is not the number of lines in tList then put item 2 of line x of tList + tLength into tLength else put 1 - tLength into item 2 of line x of tList end if end repeat set the altBtnIDs of me to tList end altFinishTracking on InitAltFldHeader # should call this when 'setting up' the original group for the first time # not necessary to call this ever again # builds a sorted left to right list of all the IDs of the buttons in this group and sets the altBtnIDs property to it set the lockLoc of grp "altFldHeader" to true set the left of grp "altFldHeader" to the altLeftMargin of grp "altFldHeader" set the width of grp "altFldHeader" to \ the width of this cd - the altLeftMargin of grp "altFldHeader" - the altRightMargin of grp "altFldHeader" put (the width of grp "altFldHeader" - the altLeftButPad of grp "altFldHeader" - the altRightButPad of grp "altFldHeader") into tWidth repeat with x = 1 to the number of btns on this cd put the id of grp "altFldHeader" into tID if the long ID of btn x contains ("group ID " & tID) then put the id of btn x & "," & \ item 1 of the loc of btn x & "," & \ round(100*the width of btn x/tWidth)/100 & "," & \ the altMinWidth of btn x & "," & \ cr after tBtnIdList put the height of btn x into tHeight end if end repeat if the number of lines in tBtnIdList < 3 then answer warning "Not enough buttons in the altFldHeader Group for it to work!" exit InitAltFldHeader end if delete last char of tBtnIdList sort lines of tBtnIdList ascending numeric by item 2 of each set the height of grp "altFldHeader" to \ the altTopButPad of grp "altFldHeader" + tHeight + the altBotButPad of grp "altFldHeader" put 0 into tLength # do some clean up and make sure the total of all button width percentages = 100 # add the altOrder property to each button repeat with x = 1 to the number of lines in tBtnIdList delete item 2 of line x of tBtnIdList delete last char of line x of tBtnList set the altOrder of btn id (item 1 of line x of tBtnIdList) to x if x is not the number of lines in tBtnIdList then put item 2 of line x of tBtnIdList + tLength into tLength else put 1 - tLength into item 2 of line x of tBtnIdList end if end repeat set the altBtnIDs of grp "altFldHeader" to tBtnIdList put the left of grp "altFldHeader" into tL put tL + the altLeftButPad of grp "altFldHeader" into tL repeat for each line L in the altBtnIDs of grp "altFldHeader" set the lockloc of btn id (item 1 of L) to true set the top of btn id (item 1 of L) to the top of grp "altFldHeader" + the altTopButPad of grp "altFldHeader" set the left of btn id (item 1 of L) to tL if the altDontResize of btn id (item 1 of L) then set the width of btn id (item 1 of L) to the altMinWidth of btn id (item 1 of L) else set the width of btn id (item 1 of L) to round(tWidth * item 2 of L) end if put the right of btn id (item 1 of L) into tL end repeat # fine tuning done at the end set the width of btn id item 1 of last line of the altBtnIDs of grp "altFldHeader" to \ the right of grp "altFldHeader" - the altRightButPad of grp "altFldHeader" \ - the left of btn id item 1 of last line of the altBtnIDs of grp "altFldHeader" if not exists(fld the altTargetField of grp "altFldHeader") then answer warning "No designated fld found. Please set the altTargetField property!" exit InitAltFldHeader end if put 0 into tW if the vscrollbar of fld the altTargetField of grp "altFldHeader" then put the scrollbarwidth of fld the altTargetField of grp "altFldHeader" into tW end if set the width of fld the altTargetField of grp "altFldHeader" to \ the width of grp "altFldHeader" + tW set the lockLoc of fld the altTargetField of grp "altFldHeader" to true altFinishTracking end InitAltFldHeader < altTrackModefalsealtLeftButPad3 altBtnIDsE1011,0.05,30, 1010,0.05,30, 1017,0.12,45, 1018,0.36,45, 1005,0.42,45,altRightButPad2altRealTimeTrackingtruealtLeftMargin20altTargetField TestField altTopButPad2 altMovingNow1018,0.13,45, 1005,0.65,45,altRightMargin20altMoveColumnfalse altBotButPad2 cREVGeneralscriptChecksumȺ"X׼{o bookmarks revUniqueID 1038674566494 handlerListmmouseDown mouseUp mouseEnter mouseLeave mouseRelease mouseMove resizeStack altFinishTracking InitAltFldHeaderscriptSelectionchar 130 to 129 prevHandler whichBoundary tempScriptscript<

#

# ___ __ ____________ ___ __ _________ ___ _______

# / _ | / //_ __/ __/ / / _ \/ // / __/ _ | / _ \/ __/ _ \

# / __ |/ /__/ / / _// /__/ // / _ / _// __ |/ // / _// _/

# /_/ |_/____/_/ /_/ /____/____/_//_/___/_/ |_/____/___/_/|_|

#

# ------------------------------------------------------------------------------------------------------------

# Control: altFldHeader

# by Chipp Walters, Altuit, inc.

#

# Instructions for Use:

#

# The altFldHeader is a group control which is linked to a field. The user can resize the stack window and the column buttons and linked field columns will resize automatically. You can also interactively place the cursor between buttons, click and drag to resize a column. Columns can be set with a minimum size which they can shrink to.

#

# Features:

# The Field Header buttons can be enabled to do sorts etc..

# Realtime column tracking can be on or off.

# Minimum Field widths can be set.

# Header and Field resize with stack

# Specified Fields can be set to never resize

#

# How to use:

#

# You may edit the group "altFldHeader" to add or delete buttons.

# Just copy and paste one of the existing buttons.

# You may also edit the altMinWidth custom property of each button

# to set the minimum resize width in pixels.

#

# There is no maximum limit for the number of buttons.

# You need to use at least 2 buttons for this control to work.

# Once your finished setting and naming your buttons, press the "Init Grp" button.

# You needn't set up your buttons perfectly as the InitAltFldHeader handler

# will do this automatically for you.

#

# You may put a mouseUp handler in any of the button scripts,

# but please put "pass mouseUp" in the handler so the control can manage the hiliting.

# Make sure and set the altEnableBtn property to true for the button the script is in.

#

# You'll need to copy the image "moveColumn" to your stack (upper left). Don't rename it.

# It's used as an icon resource.

#

# Here are the custom properties for the group "altFldHeader".

# Please do not set the one marked "used internally"

#

# altTrackMode -used internally

# altLeftButPad - the distance in pixels which the left group boundary sets from the leftmost button

# altBtnIDs -used internally

# altRightButPad - the distance in pixels which the right group boundary sets from the rightmost button

# altLeftMargin - the distance in pixels the group sets from the left of the stack

# altTargetField - the name of the associated field

# altTopButPad - the distance in pixels which the top group boundary sets from the top of the buttons

# altMovingNow -used internally

# altRightMargin- the distance in pixels the group sets from the right of the stack

# altMoveColumn -used internally

# altBotButPad - the distance in pixels which the bottom group boundary sets from the bottom of the buttons

#

# Here are the custom properties for the buttons. Please do not set the one marked "used internally"

#

# altDontResize - set to true if you want the field to always have a fixed width (as set by altMinWidth)

# altEnableBtn - set to true if you wish to enable the button visual animation. Make sure and put a "pass mouseUp" in your "on mouseUp" handler for this to work. Even when set to false, button handlers will execute, this property only effects the up / down animation for the button.

# altMinWidth - the minumum width in pixels the column can ever shrink to. Also used by the InitAltFldHeader for setting the width of a button when the altDontResize property is set to true.

# altOrder -used internally

#

# Notes:

#

# 1) It's important that the backgroundBehavior of grp "altFldHeader" be set to true so the group receives the resize command.

# 2) All scripts are located inside the group "altFldHeader"

# ------------------------------------------------------------------------------------------------------------

on mouseDown

if the cursor is (the id of img "moveColumn") then

lock cursor

set the altMovingNow of me to ""

put the altOrder of the target into x

if mouseH() < item 1 of the loc of the target then #other button on left

put line x-1 of the altBtnIDs of me into line 1 of temp

put line x of the altBtnIDs of me into line 2 of temp

else #other button on right

put line x of the altBtnIDs of me into line 1 of temp

put line x + 1 of the altBtnIDs of me into line 2 of temp

end if

set the altMovingNow of me to temp

set the altMoveColumn of me to true

else

if the target contains "button" then

if the altEnableBtn of the target then set the hilite of the target to true

end if

end if

end mouseDown

on mouseUp

set the altMoveColumn of me to false

unlock cursor

if the target contains "button" then

if the altEnableBtn of the target then set the hilite of the target to false

end if

altFinishTracking

end mouseUp

on mouseEnter x,y

if the target contains "button" then

lock cursor

set the altTrackMode of me to true

end if

end mouseEnter

on mouseLeave

unlock cursor

set the altTrackMode of me to false

end mouseLeave

on mouseRelease

unlock cursor

set the hilite of the target to false

set the altMoveColumn of me to false

altFinishTracking

end mouseRelease

on mouseMove x,y

if the altTrackMode of me then

if the target contains "button" and the altDontResize of the target is False then

switch

case x < (the left of the target + 5) and the altOrder of the target > 1 #other button on left

# gets the btn id of the 'adjacent' button

put (item 1 of line (max((the altOrder of the target - 1),1)) of the altBtnIDs of me) into tBtnID

if the altDontResize of btn ID tBtnID then

set the cursor to hand

else

set the cursor to (the id of img "moveColumn")

end if

break

case x > (the right of the target - 5) and the altOrder of the target < the number of lines in the altBtnIDs of me #other button on right

# gets the btn id of the 'adjacent' button

put (item 1 of line (min((the altOrder of the target + 1),the number of lines in the altBtnIDs of me)) of the altBtnIDs of me) into tBtnID

if the altDontResize of btn ID tBtnID then

set the cursor to hand

else

set the cursor to (the id of img "moveColumn")

end if

break

default

set the cursor to hand

end switch

else

set the cursor to hand

end if

end if

if the altMoveColumn of me then

put the altMovingNow of me into tList

set the width of btn id item 1 of tList to \

min(max(x - the left of btn id item 1 of tList,item 3 of tList),(the right of btn id item 1 of line 2 of tList - the left of btn id item 1 of tList - item 3 of line 2 of tList))

put the right of btn id item 1 of line 2 of tList into tRight

get the rect of btn id item 1 of line 2 of tList

set the rect of btn id item 1 of line 2 of tList to \

the right of btn id item 1 of tList, \

item 2 of it, \

item 3 of it, \

item 4 of it

if the altRealTimeTracking of me then altFinishTracking

end if

end mouseMove

on resizeStack

get the rect of this cd

put item 3 of it into tRight

put the left of me into tL

set the width of me to tRight-the altRightMargin of me - the altLeftMargin of me

put the width of me-the altLeftButPad of me-the altRightButPad of me into tWidth

put tL + the altLeftButPad of me into tL

repeat for each line L in the altBtnIDs of me

set the left of btn id (item 1 of L) to tL

if the altDontResize of btn id (item 1 of L) is False then

set the width of btn id (item 1 of L) to max(round(tWidth * item 2 of L),the altMinWidth of btn id (item 1 of L))

end if

put the right of btn id (item 1 of L) into tL

end repeat

set the width of btn id item 1 of last line of the altBtnIDs of grp "altFldHeader" to \

the right of grp "altFldHeader" - the altRightButPad of grp "altFldHeader" \

- the left of btn id item 1 of last line of the altBtnIDs of grp "altFldHeader"

put 0 into tW

set the lockLoc of fld the altTargetField of grp "altFldHeader" to true

if the vscrollbar of fld the altTargetField of grp "altFldHeader" then

put the scrollbarwidth of fld the altTargetField of grp "altFldHeader" into tW

end if

set the width of fld the altTargetField of grp "altFldHeader" to \

the width of grp "altFldHeader" + tW

altFinishTracking

end resizeStack

on altFinishTracking

#set the tabs for the associated field

put the left of btn id item 1 of the altBtnIDs of me into tLeft

repeat for each line L in the altBtnIDs of me

put the right of btn id item 1 of L - tLeft & "," after tTabs

end repeat

delete last char of tTabs

set the tabStops of fld the altTargetField of me to tTabs

#set the new button percentages

put the altBtnIDs of me into tList

put (the width of me - the altLeftButPad of me - the altRightButPad of me) into tWidth

put 0 into tLength

repeat with x = 1 to the number of lines in tList

put round(100*the width of btn id item 1 of line x of tList/tWidth)/100 into \

item 2 of line x of tList

if x is not the number of lines in tList then

put item 2 of line x of tList + tLength into tLength

else

put 1 - tLength into item 2 of line x of tList

end if

end repeat

set the altBtnIDs of me to tList

end altFinishTracking

on InitAltFldHeader

# should call this when 'setting up' the original group for the first time

# not necessary to call this ever again

# builds a sorted left to right list of all the IDs of the buttons in this group and sets the altBtnIDs property to it

set the lockLoc of grp "altFldHeader" to true

set the left of grp "altFldHeader" to the altLeftMargin of grp "altFldHeader"

set the width of grp "altFldHeader" to \

the width of this cd - the altLeftMargin of grp "altFldHeader" - the altRightMargin of grp "altFldHeader"

put (the width of grp "altFldHeader" - the altLeftButPad of grp "altFldHeader" - the altRightButPad of grp "altFldHeader") into tWidth

repeat with x = 1 to the number of btns on this cd

put the id of grp "altFldHeader" into tID

if the long ID of btn x contains ("group ID " & tID) then

put the id of btn x & "," & \

item 1 of the loc of btn x & "," & \

round(100*the width of btn x/tWidth)/100 & "," & \

the altMinWidth of btn x & "," & \

cr after tBtnIdList

put the height of btn x into tHeight

end if

end repeat

if the number of lines in tBtnIdList < 3 then

answer warning "Not enough buttons in the altFldHeader Group for it to work!"

exit InitAltFldHeader

end if

delete last char of tBtnIdList

sort lines of tBtnIdList ascending numeric by item 2 of each

set the height of grp "altFldHeader" to \

the altTopButPad of grp "altFldHeader" + tHeight + the altBotButPad of grp "altFldHeader"

put 0 into tLength

# do some clean up and make sure the total of all button width percentages = 100

# add the altOrder property to each button

repeat with x = 1 to the number of lines in tBtnIdList

delete item 2 of line x of tBtnIdList

delete last char of line x of tBtnList

set the altOrder of btn id (item 1 of line x of tBtnIdList) to x

if x is not the number of lines in tBtnIdList then

put item 2 of line x of tBtnIdList + tLength into tLength

else

put 1 - tLength into item 2 of line x of tBtnIdList

end if

end repeat

set the altBtnIDs of grp "altFldHeader" to tBtnIdList

put the left of grp "altFldHeader" into tL

put tL + the altLeftButPad of grp "altFldHeader" into tL

repeat for each line L in the altBtnIDs of grp "altFldHeader"

set the lockloc of btn id (item 1 of L) to true

set the top of btn id (item 1 of L) to the top of grp "altFldHeader" + the altTopButPad of grp "altFldHeader"

set the left of btn id (item 1 of L) to tL

if the altDontResize of btn id (item 1 of L) then

set the width of btn id (item 1 of L) to the altMinWidth of btn id (item 1 of L)

else

set the width of btn id (item 1 of L) to round(tWidth * item 2 of L)

end if

put the right of btn id (item 1 of L) into tL

end repeat

# fine tuning done at the end

set the width of btn id item 1 of last line of the altBtnIDs of grp "altFldHeader" to \

the right of grp "altFldHeader" - the altRightButPad of grp "altFldHeader" \

- the left of btn id item 1 of last line of the altBtnIDs of grp "altFldHeader"

if not exists(fld the altTargetField of grp "altFldHeader") then

answer warning "No designated fld found. Please set the altTargetField property!"

exit InitAltFldHeader

end if

put 0 into tW

if the vscrollbar of fld the altTargetField of grp "altFldHeader" then

put the scrollbarwidth of fld the altTargetField of grp "altFldHeader" into tW

end if

set the width of fld the altTargetField of grp "altFldHeader" to \

the width of grp "altFldHeader" + tW

set the lockLoc of fld the altTargetField of grp "altFldHeader" to true

altFinishTracking

end InitAltFldHeader

EE g@caltDontResizeFalse altEnableBtnfalse altOrder5 altMinWidth45 cREVGeneral bookmarks revUniqueID 1038674483490 handlerListscriptSelection char 1 to 0 prevHandler tempScriptscript BE g@5altDontResizetrue altEnableBtnfalse altOrder2 altMinWidth30 cREVGeneral bookmarks revUniqueID 1038674483490 handlerListscriptSelection char 1 to 0 prevHandler tempScriptscript AE w5on mouseUp put "hello" pass mouseUp end mouseUp @altDontResizetrue altEnableBtnfalse altOrder1 altMinWidth30 cREVGeneralscriptChecksum祣uÀ bookmarks revUniqueID 1038674483490 handlerListmouseUpscriptSelection char 40 to 39 prevHandler mouseOver tempScriptscript

on mouseUp

put "hello"

pass mouseUp

end mouseUp

CE g@SDaltDontResizefalse altEnableBtntrue altOrder3 altMinWidth45 cREVGeneral bookmarks revUniqueID 1038674483490 handlerListscriptSelection char 1 to 0 prevHandler tempScriptscript DE g@altDontResizefalse altEnableBtntrue altOrder4 altMinWidth45 cREVGeneral bookmarks revUniqueID 1038674483490 handlerListscriptSelection char 1 to 0 prevHandler tempScriptscript "Edit Script of grp "altFldHeader"Ep͈1 bookmarks revUniqueID 1038675844569 handlerListmouseUpscriptSelection char 11 to 10 prevHandlermouseUp tempScriptscript

on mouseUp

edit script of grp "altFldHeader"

end mouseUp

Initialize altFldHeaderEpHon mouseUp send "InitAltFldHeader" to grp "altFldHeader" end mouseUp  cREVGeneralscriptChecksumųJ5˵H4ljK revUniqueID 1038713936859 bookmarks handlerListmouseUp tempScript prevHandlermouseUpscriptSelection char 72 to 71script

on mouseUp

send "InitAltFldHeader" to grp "altFldHeader"

end mouseUp

 moveColumn @bGIF89a!,3 V/N M.<_YdUA̪Եv, ]BhT; cREVGeneral bookmarks revUniqueID 1038728748796 handlerListscriptSelection char 1 to 0 prevHandler tempScriptscript  testField )a0L<L7 cREVGeneralscriptChecksumُ B~ bookmarks revUniqueID 1038732983923 handlerList prevHandler tempScriptscript

 `@O1 )`J cREVGeneral revUniqueID 1038734540705  Instructions for Use:  QThe altFldHeader is a group control which is linked to a field. The user can resize the stack window and the column buttons and linked field columns will resize automatically. You can also interactively place the cursor between buttons, click and drag to resize a column. Columns can be set with a minimum size which they can shrink to.  Features: ; The Field Header buttons can be enabled to do sorts etc.. , Realtime column tracking can be on or off. " Minimum Field widths can be set. $ Header and Field resize with stack - Specified Fields can be set to never resize  How to use:  4First, you should copy the following to your stack:   the group "altFldHeader" : the img "moveColumn" (upper left to be used as a cursor) " the btn "Intialize altFldHeader" b and if you don't already have a field, copy the fld "testFld" just below the altFldHeader group.  aNext, click the "Initalize altFldHeader" btn. This will set it to work with the correct btn IDs.  )You may edit the group "altFldHeader" to add or delete buttons. Just copy and paste one of the existing buttons. You may also edit the altMinWidth custom property of each button to set the minimum resize width in pixels. There is no maximum limit for the number of buttons. You need to use at least 2 buttons for this control to work. Once your finished setting and naming your buttons, press the "Init Grp" button. You needn't set up your buttons perfectly as the InitGrp button (calls the InitAltFldHeader handler) will do this automatically for you.  You may put a mouseUp handler in any of the button scripts, but please put "pass mouseUp" in the handler so the control can manage the hiliting. Make sure and set the altEnableBtn property to true for the button the script is in.  wYou'll need to copy the image "moveColumn" to your stack (upper left). Don't rename it. It's used as an icon resource.  pHere are the custom properties for the group "altFldHeader". Please do not set the one marked "used internally"  altTrackMode -used internally   caltLeftButPad - the distance in pixels which the left group boundary sets from the leftmost button  F S altBtnIDs -used internally   faltRightButPad - the distance in pixels which the right group boundary sets from the rightmost button  W QaltLeftMargin - the distance in pixels the group sets from the left of the stack  C 2altTargetField - the name of the associated field  # daltTopButPad - the distance in pixels which the top group boundary sets from the top of the buttons  W altMovingNow -used internally   RaltRightMargin- the distance in pixels the group sets from the right of the stack  C altMoveColumn -used internally   jaltBotButPad - the distance in pixels which the bottom group boundary sets from the bottom of the buttons  ]  cHere are the custom properties for the buttons. Please do not set the one marked "used internally"  galtDontResize - set to true if you want the field to always have a fixed width (as set by altMinWidth)  Y altEnableBtn - set to true if you wish to enable the button visual animation. Make sure and put a "pass mouseUp" in your "on mouseUp" handler for this to work. Even when set to false, button handlers will execute, this property only effects the up / down animation for the button.   altMinWidth - the minumum width in pixels the column can ever shrink to. Also used by the InitAltFldHeader for setting the width of a button when the altDontResize property is set to true.  altOrder -used internally    Notes:  }1) It's important that the backgroundBehavior of grp "altFldHeader" be set to true so the group receives the resize command. ;2) All scripts are located inside the group "altFldHeader"  `@O  New Field 1 > cREVGeneral revUniqueID 1038736146137 Control altFldHeader 0.93     New Field 2 r cREVGeneral revUniqueID 1038736283403 .send comments / bug reports to: Chipp Walters mailto:chipp@chipp.com Win Style Stack Resizer"BPlocal lMoving, lDistance on mouseDown put true into lMoving put the right of this stack - item 1 of the screenMouseloc,the bottom of this stack - item 2 of the screenMouseLoc into lDistance end mouseDown on mouseUp put false into lMoving unlock cursor end mouseUp on mouseRelease put false into lMoving unlock Cursor end mouseRelease on mouseMove if lMoving then put item 1 to 2 of the rect of this stack,item 1 of the screenMouseloc+item 1 of lDistance,item 2 of the screenMouseloc+item 2 of lDistance into tRect if item 3 of tRect < (the minWidth of this stack+the left of this stack) then put (the minWidth of this stack+the left of this stack) into item 3 of tRect if item 4 of tRect < (the minHeight of this stack+the top of this stack) then put (the minHeight of this stack+the top of this stack) into item 4 of tRect if item 3 of tRect > (the maxWidth of this stack+the left of this stack) then put (the maxWidth of this stack+the left of this stack) into item 3 of tRect if item 4 of tRect > (the maxHeight of this stack+the top of this stack) then put (the maxHeight of this stack+the top of this stack) into item 4 of tRect lock screen set the rect of this stack to tRect set the bottomRight of me to the width of this stack, the height of this stack unlock screen end if end mouseMove on mouseEnter if the platform is not "MacOS" then lock cursor set cursor to the cWinCursor of me end if end mouseEnter on mouseLeave put false into lMoving unlock cursor end mouseLeave W|  cWinCursor200308p cREVGeneral bookmarks revUniqueID 1038736476839 handlerList>mouseDown mouseUp mouseRelease mouseMove mouseEnter mouseLeavescriptSelectionchar 221 to 220 prevHandler mouseDown tempScriptscript Realtime column tracking`E`on mouseUp set the altRealTimeTracking of grp "altFldHeader" to the hilite of me end mouseUp  cREVGeneralscriptChecksum+[Үz#-^{ revUniqueID 1038860401557 bookmarks handlerListmouseUp tempScript prevHandlerscriptSelection char 83 to 82script

on mouseUp

set the altRealTimeTracking of grp "altFldHeader" to the hilite of me

end mouseUp