Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Unable to resize a DiagramNode (Read 2313 times)
GDICommander
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 3
Joined: Nov 19th, 2009
Unable to resize a DiagramNode
Nov 19th, 2009 at 3:55pm
Print Post  
Hi, everyone!

I'm trying to resize a DiagramNode in an event handler by using the Resize method. Unfortunately, it doesn't work.

I'm using a class, StateDiagramItem, that derives from ShapeNode, that derives from DiagramNode.

It's strange, because in the constructor of StateDiagramItem, a call to Resize works!

Can somebody help me?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Unable to resize a DiagramNode
Reply #1 - Nov 19th, 2009 at 4:22pm
Print Post  
Hi,

What event are you handling exactly? Calling Resize on an item that's currently being modified won't work. Instead you will have to override the UpdateModify method. If calling Resize on a different node but still during some item's modification, you must call the RecreateCacheImage method.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
GDICommander
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 3
Joined: Nov 19th, 2009
Re: Unable to resize a DiagramNode
Reply #2 - Nov 19th, 2009 at 4:34pm
Print Post  
I looked at my code and the Resize operation that doesn't work is done on an event handler that is hooked on the OnNodeTextEdited event. So, according to your last post, I can't call Resize here because the node is being modified.
  
Back to top
 
IP Logged
 
GDICommander
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 3
Joined: Nov 19th, 2009
Re: Unable to resize a DiagramNode
Reply #3 - Nov 19th, 2009 at 4:51pm
Print Post  
Unfortunately, I don't know where UpdateModify and RecreateCacheImage methods are. Can you tell me where they are?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Unable to resize a DiagramNode
Reply #4 - Nov 19th, 2009 at 5:43pm
Print Post  
DiagramItem.UpdateModify and DiagramView.RecreateCacheImage.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint