ConstrainRectangular error
Moderators: heatherlaine, kevinmiller, robinmiller, malte
ConstrainRectangular error
Hi,
I have a problem with constrainRectangular.
I have a group with many buttons and graphics inside. I set the constrainRectangular to the rect of the group.
I put the "grab me" with the mousedown of each control with the "mousedown pass", so the controls don't must go outside the group, but if I grab any and while the mousedown is active the control go outside the group. It's like the control stop at first step with the border of the group but if I move far away the group finally the control go out.
Any idea? I'm missing something?
Salut,
Josep M
I have a problem with constrainRectangular.
I have a group with many buttons and graphics inside. I set the constrainRectangular to the rect of the group.
I put the "grab me" with the mousedown of each control with the "mousedown pass", so the controls don't must go outside the group, but if I grab any and while the mousedown is active the control go outside the group. It's like the control stop at first step with the border of the group but if I move far away the group finally the control go out.
Any idea? I'm missing something?
Salut,
Josep M
Re: ConstrainRectangular error
Hi Josep,
you indeed are missing something.
There is no need to use grab at all with the constrainRectangular of a control set. Instead, make sure the control can receive all mouseMessages (mouseDown / mouseUp / mouseMove)
Hope that helps,
Malte
you indeed are missing something.
There is no need to use grab at all with the constrainRectangular of a control set. Instead, make sure the control can receive all mouseMessages (mouseDown / mouseUp / mouseMove)
Hope that helps,
Malte
Re: ConstrainRectangular error
Also make sure that the groups lockLoc is set to true...
Re: ConstrainRectangular error
Hi Malte,
Yes, the problem was with the "grab me"...
But that I try seems don't work or maybe it's not possible.
I try to set the constrain of a group to another group. The group B have a chess board as image and the pieces with the constrain set to the board. This work fine.
But then I want set the constrain of this group B to a another group A. The group A is like a visor, the user don't see the whole chess board so he must move it through the group A.
When I click over the pieces, they move correctly but when click over the chess board to move it, nothing happen....
It's posible?
The code:
That I want is that moving the board also move the pieces without recalculate the positions...
Salut,
Josep M
Yes, the problem was with the "grab me"...
But that I try seems don't work or maybe it's not possible.
I try to set the constrain of a group to another group. The group B have a chess board as image and the pieces with the constrain set to the board. This work fine.
But then I want set the constrain of this group B to a another group A. The group A is like a visor, the user don't see the whole chess board so he must move it through the group A.
When I click over the pieces, they move correctly but when click over the chess board to move it, nothing happen....
It's posible?
The code:
Code: Select all
on mouseUp
set the constrainRectangular of button "c1" to the rect of group "board"
set the constrainRectangular of button "c2" to the rect of group "board"
set the constrainRectangular of group "board" to the rect of group "viewer"
end mouseUp
Salut,
Josep M
Re: ConstrainRectangular error
Goups are a little trickier to handle...
I am currently in hospital, so I can not whip up something quickly. I shall be back in office next week and see if I can post an example script.
Cheers,
Malte
I am currently in hospital, so I can not whip up something quickly. I shall be back in office next week and see if I can post an example script.
Cheers,
Malte
Re: ConstrainRectangular error
Hi Malte,
Thanks for answer. Don't worry.
Keep well.
Josep M
Thanks for answer. Don't worry.
Keep well.
Josep M
Re: ConstrainRectangular error
Hi Malte,
Can you able to think how to solve the issue of groups?
Salut,
Josep M
Can you able to think how to solve the issue of groups?
Salut,
Josep M