I have my application that has a disclosure triangle, and also a text object, that are connected to a script, that when either are clicked on, the window increases its size vertically, or if open then it collapses. Works totally fine for me at this point.
just script for the triangle object:
on clicked the_object
set object_name to name of the_object as string
if object_name = "triangle" then
if state of the_object = 0 then
set the_delta to 470
else
set the_delta to -470
end if
tell window of the_object
set {x1, y1, x2, y2} to bounds
set bounds to {x1, (y1 + the_delta), x2, y2}
end tell
end if
end clicked
I am wondering if I can do this via bindings or some way in IB. So I don’t have to use a script to do this. Can the disclosure triangle simply ‘add’ or ‘subtract’ size from the window? I understand how to do some basic bindings, like making a checkbox be able to enable or disable other checkboxes or UI items depending on its state… but how would adding a number size work? I see that the window object has size property/bindings.
TIA, Chris