Geometry pane for resizing

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
abanowBUSTfGf
Posts: 63
Joined: Sat Dec 22, 2012 3:01 am

Geometry pane for resizing

Post by abanowBUSTfGf » Fri Jan 25, 2013 3:14 am

I have a number of objects on my main stack linked to a substack.
I have used the geometry pane to resize to scale on the images on both the main and substack.
However when I resize the main stack the images linked to the substack do not resize as I hoped they would.
Any ideas? Thanks.

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: Geometry pane for resizing

Post by sturgis » Fri Jan 25, 2013 4:00 am

You'll need to script it yourself. The geometry manager is ok for very simple setups where you just want to arrange things on the current stack when the stack is resized.

Look at "resizestack" in the dictionary. You can use resize stack to run your custom sizing and positioning code. Without knowing exactly what you want to do, here is a very short simple example.

on resizestack
resizeTheMainStackObjects --run the custom resizing handler for the stack
send "resizeTheSubStackObjects" to me in 1 tick -- run the custom resizing handler for the substack
end resizestack

command resizeTheMainStackObjects -- create a handler and name it whatver.
--size and position all your objects on the main stack
end resizeTheMainStackObjects

command resizeTheSubStackObjects -- this runs after the mainstack is sized, so that its new object sizes and positions can be referenced by the substack
-- put your code to resize the substack here
end resizeTheSubStackObjects

Post Reply