Page Index Toggle Pages: 1 2 [3]  Send TopicPrint
Very Hot Topic (More than 25 Replies) Customizing node appearance (Read 14191 times)
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Customizing node appearance
Reply #30 - Jan 21st, 2010 at 4:09pm
Print Post  
You can handle the EnterInplaceEditMode event to get a reference to the TextBox control used for editing, and then attach a KeyDown event handler to it to detect Shift+Enter.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Hunter
Full Member
***
Offline



Posts: 194
Location: Sevastopol
Joined: Dec 1st, 2009
Re: Customizing node appearance
Reply #31 - Jan 21st, 2010 at 4:14pm
Print Post  
Ok. Thanks. I try it. Is it possible to change TextBox by RichTextBox control?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Customizing node appearance
Reply #32 - Jan 21st, 2010 at 4:28pm
Print Post  
It isn't, unless you implement inplace editing yourself by adding a DiagramNodeAdapter(RichTextBox) to the diagram, and remove it when done editing.
  
Back to top
 
IP Logged
 
Hunter
Full Member
***
Offline



Posts: 194
Location: Sevastopol
Joined: Dec 1st, 2009
Re: Customizing node appearance
Reply #33 - Jan 21st, 2010 at 4:34pm
Print Post  
Ok. I see. Thank you very much for your answers
  
Back to top
 
IP Logged
 
Hunter
Full Member
***
Offline



Posts: 194
Location: Sevastopol
Joined: Dec 1st, 2009
Re: Customizing node appearance
Reply #34 - Jan 28th, 2010 at 6:47am
Print Post  
Hello, Stoyan.
I have the problem with UndoManager. I derived me node class from ShapeNode and customize it by some new properties such as number of inputs/outputs, show indexes of the anchor points, shadow properties: show shadow, shadow depth and shadow color and etc. And for undo/redo I use the ChangeItemCmd. But when I try to Undo shadow properties is not undo. What happens? Am I need to override ChangeItemCmd class as in the help file?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Customizing node appearance
Reply #35 - Jan 28th, 2010 at 9:41am
Print Post  
Hi,

Derive from ShapeNodeProperties and add your additional properties to it. Then override the CreateState, SaveState and RestoreState methods in your custom node class. CreateState should return an instance of your Properties-derived class. The Save/Restore methods should copy the properties from the Node to the Properties object or in reverse.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Hunter
Full Member
***
Offline



Posts: 194
Location: Sevastopol
Joined: Dec 1st, 2009
Re: Customizing node appearance
Reply #36 - Jan 28th, 2010 at 11:20am
Print Post  
Thanks! I realize this by my derived class from Command and add it into sumcommands collection of the ChangeItemCmd. But later I try yuor method.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 2 [3] 
Send TopicPrint