Page 1 of 1
expand/reduce control
Posted: Wed Oct 18, 2006 11:25 am
by lbtony
In development mode, when we click on an object a square with dots appear on its boarder then we can expand/reduce the size of it. How can I apply this to my controls in run mode? what are the key properties/hanlders/functions to acheive this?
Cheers.
Posted: Wed Oct 18, 2006 12:07 pm
by malte
Hi ibTony,
I'm afraid, that is not too easy. I ended up mimicin the behaviour.
A simple script to get you started. In the card script:
Code: Select all
on mouseDown
select the target
end mouseDown
on mouseUp
select empty
end mouseUp
on mouseRelease
mouseUp
end mouseRelease
on mouseMove
if the target is not me then
if the selected of the target then
set the rect of the target to the topLeft of the target,the mouseLoc
end if
end if
end mouseMove
Posted: Wed Oct 18, 2006 12:30 pm
by lbtony
Hi Malte,
Thank you, I get your idea now. My question is, how can I tell, which dot on the boarder line the mouse pointer is on? Because I think each dot on the boarder has different bahaviours in terms of the direction to expanding/reducing a control, which in turn will result the use of different properties e.g. topLeft, bottomRight
Hope I made myself clear. Cheers.
Posted: Thu Oct 19, 2006 12:51 pm
by malte
Hi ibtony,
as I said this is a tad complicated. I would need to rip off the code of an existing project. Actually I have mimiced the complete behaviour with the help of another coder (thanks again kWeed!) including the ability to drag and even the select handles were scripted. I am afraid I do not have the time to tear the stack apart at the moment. I'll update you as soon as I can.
All the best,
Malte
Posted: Thu Oct 19, 2006 3:46 pm
by FourthWorld
choose pointer tool
Posted: Fri Oct 20, 2006 3:32 pm
by lbtony
I need to be able to resize controls especially image objects in run mode. So I don't think choose pointer tool will work for me:)
Posted: Fri Oct 20, 2006 5:33 pm
by FourthWorld
lbtony wrote:I need to be able to resize controls especially image objects in run mode. So I don't think choose pointer tool will work for me:)
Transcript provides a variety of tools, all of which are available at runtime. See the Dictionary entry for the choose command for details.