Make shape not resizable [message #213876] |
Tue, 11 April 2006 15:45 |
Eclipse User |
|
|
|
Originally posted by: markp.softlanding.com
I have an editor that is based on the Shapes Example. I am using
RoundedRectangles in the diagram and I want to set the size in my code
and not allow the shape to be resized. I do want to allow it to be
moved.
Is there a "right way" to do this. I have forcibly done it in my code,
but when you click on shape you still have all of the resize handles.
Ideally, you would not.
Thanks
Mark
|
|
|
Re: Make shape not resizable [message #213914 is a reply to message #213876] |
Tue, 11 April 2006 19:10 |
Eclipse User |
|
|
|
Originally posted by: micha.m2visio.de
You can define it the XYLayoutPolicy of shape's parent
protected EditPolicy createChildEditPolicy(EditPart child) {
return new NonResizableEditPolicy();
}
Michael
"Mark Phippard" <markp@softlanding.com> schrieb im Newsbeitrag
news:e1givd$b8r$1@utils.eclipse.org...
>I have an editor that is based on the Shapes Example. I am using
> RoundedRectangles in the diagram and I want to set the size in my code
> and not allow the shape to be resized. I do want to allow it to be
> moved.
>
> Is there a "right way" to do this. I have forcibly done it in my code,
> but when you click on shape you still have all of the resize handles.
> Ideally, you would not.
>
> Thanks
>
> Mark
|
|
|
Re: Make shape not resizable [message #213922 is a reply to message #213914] |
Tue, 11 April 2006 19:41 |
Eclipse User |
|
|
|
Originally posted by: markp.softlanding.com
Michael wrote:
> You can define it the XYLayoutPolicy of shape's parent
>
> protected EditPolicy createChildEditPolicy(EditPart child) {
> return new NonResizableEditPolicy();
> }
Thanks, that worked nicely!
Mark
|
|
|
Powered by
FUDForum. Page generated in 0.03517 seconds