Page Index Toggle Pages: [1] 2  Send TopicPrint
Very Hot Topic (More than 25 Replies) Disable node resizing (Read 15156 times)
Hai
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 63
Joined: Jan 7th, 2009
Disable node resizing
Feb 26th, 2009 at 4:11pm
Print Post  
Hi Soyan

Is there a way to prevent the user from resizing nodes ?
Without preventing him from moving it....

Thx
Hai
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Disable node resizing
Reply #1 - Feb 27th, 2009 at 5:16am
Print Post  
Hi Hai,

This version adds the EnabledHandles property:
https://mindfusion.eu/_beta/diaglite_enabledhandles.zip

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Hai
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 63
Joined: Jan 7th, 2009
Re: Disable node resizing
Reply #2 - Mar 1st, 2009 at 8:04am
Print Post  
Yup
It did....  8)
  
Back to top
 
IP Logged
 
jaiswalamit
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 64
Joined: Feb 17th, 2009
Re: Disable node resizing
Reply #3 - Mar 3rd, 2009 at 12:30pm
Print Post  
Hi Hai/Stoyan,

I am not able to use this property to get the desired outcome which is: Noderesize is stopped but movement is allowed. Is there any sample snippet you can share.

Thanks,
Amit
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Disable node resizing
Reply #4 - Mar 3rd, 2009 at 2:45pm
Print Post  
Hi Amit,

Doesn't this work?
node.EnabledHandles = AdjustmentHandles.Move;

Stoyan
  
Back to top
 
IP Logged
 
jaiswalamit
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 64
Joined: Feb 17th, 2009
Re: Disable node resizing
Reply #5 - Mar 4th, 2009 at 7:56am
Print Post  
Hi Stoyan,

It did work thanks. Is this property available at the diagram level, so that I set this (or simlar property once) and dont have to do for each node I add dynamically.

Regards,
Amit
  
Back to top
 
IP Logged
 
Hai
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 63
Joined: Jan 7th, 2009
Re: Disable node resizing
Reply #6 - Mar 4th, 2009 at 8:03am
Print Post  
Hi Amit
( IL ? Wink )


This worked for me in the nodes level as well (did it during creation)

The thing now is that the user can "mark" grey rectangles on the diagram...
And with these rectangles he is making multi-select to the nodes....

Stoyan,
Can this behavior be canceled?

Many Thanks

Hai
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Disable node resizing
Reply #7 - Mar 4th, 2009 at 9:31am
Print Post  
Hi Hai,

Is there something wrong with how multiple selection works, or you just don't want it in your application? In the Windows Forms version you could set diagram.Selection.AllowMultiple = false; we'll implemented in Silverlight if it's not there yet.

Stoyan
  
Back to top
 
IP Logged
 
Hai
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 63
Joined: Jan 7th, 2009
Re: Disable node resizing
Reply #8 - Mar 4th, 2009 at 9:42am
Print Post  
Hi Stoyan

Hi Stoyan

Thank you for your reply...
I'll try to make myself clear
1. The AllowMultiple  options will be great since I do not want the user to select more then one.
2. The "Selection" rectangle is annoying.... any way to disable it ?
Thx
Hai
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Disable node resizing
Reply #9 - Mar 4th, 2009 at 10:20am
Print Post  
Hi Hai,

With most Behavior types, the selection rectangle should appear only if you hold down Ctrl, except for Modify where it appears just by drawing with the mouse. Are you using Modify?

Stoyan
  
Back to top
 
IP Logged
 
Hai
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 63
Joined: Jan 7th, 2009
Re: Disable node resizing
Reply #10 - Mar 4th, 2009 at 10:29am
Print Post  
Hi Stoyan

I do not use Modify

I use Behavior.DoNothing
and depend on user action I use
Behavior.DrawLinks and Behavior.LinkControls
And then return to Behavior.DoNothing

Is it a bug ? can you reproduce it ?

Hai
  
Back to top
 
IP Logged
 
Hai
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 63
Joined: Jan 7th, 2009
Re: Disable node resizing
Reply #11 - Mar 5th, 2009 at 10:01am
Print Post  
And one more thing…
I want the user to be able to Drag the node on first click. What I did was:

void NewNode_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
    if (fCartTst.Behavior == Behavior.DoNothing)
    {
       fCartTst.Selection.Clear();
       ((DiagramNode)sender).Selected = true;
    }
}

1.
Check that I'm not in "Links" mode….
2.
Add this new event to the new nodes I create.
3.
On this event I clear previously selected
4.
Set current node as selected.
The outcome of this approach is pretty good. The user put his mouse down on the node and can start dragging it.
But there is still one problem here… the user have to select the node in the center!!
If he is out of the "small central selection white rectangle" he will get the multi selection rectangle I mentioned before….

Is there a way to set all of the node to be draggable on mouse down and not only if the user click [u][b]exactly [/b][/u] in the center ?


(Stoyan, your support is one of the best that I've met… just go on be yourself… :-)

Many Thanks

Hai
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Disable node resizing
Reply #12 - Mar 5th, 2009 at 12:10pm
Print Post  
that was so poetic Tongue We have a property for doing exactly that in the Windows Forms version. Will port to Silverlight it in the next couple of days for you.

Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Disable node resizing
Reply #13 - Mar 6th, 2009 at 1:17pm
Print Post  
Hi Hai,

This version adds the ModificationStart property to Diagram:
https://mindfusion.eu/_beta/diaglite_modfstart.zip

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Hai
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 63
Joined: Jan 7th, 2009
Re: Disable node resizing
Reply #14 - Mar 8th, 2009 at 10:25am
Print Post  
Hi Stoyan
1.
I've read the documentayion... but could hardly understand how will this help my request.

Can you please give me a brief description on this property and its 2 possible values and how they will influance the nodes ?

2.
And, regarding resize block....
When I want to change te width/height of a node via code I do not see the change.... Even when I try it like that...

Cur_Sel_Node.EnabledHandles = AdjustmentHandles.All;
Cur_Sel_Node.Height = Convert.ToInt32(strNewValue);
Cur_Sel_Node.EnabledHandles = AdjustmentHandles.Move;

What am i doing wrong ?



many thx

Hai
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint