expand/reduce control
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
expand/reduce control
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.
Cheers.
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:
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
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.
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.
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
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
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact: