Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Attachments (Read 3216 times)
SC
YaBB Newbies
*
Offline



Posts: 37
Joined: Jan 18th, 2008
Attachments
Jul 22nd, 2008 at 9:47pm
Print Post  
Is it possible to create custom shape from propertygrid?
Also how can attach square on the left and right of a give custom node?
I have noticed AttachToCorner property takes second arguemtn as int but changing that value is not making any change to the position of the attachment.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Attachments
Reply #1 - Jul 23rd, 2008 at 8:14am
Print Post  
Quote:
Is it possible to create custom shape from propertygrid?

Do you mean you need to define a new geometric shape from the property grid, and assign it to ShapeNode.Shape?

Set the squares' Bounds property so that they are aligned to the respective node size. Use the AttachTo arguments to specify to which corner or side each square should ne anchored - this is useful only when the main node can be resized.

Stoyan
  
Back to top
 
IP Logged
 
SC
YaBB Newbies
*
Offline



Posts: 37
Joined: Jan 18th, 2008
Re: Attachments
Reply #2 - Jul 23rd, 2008 at 4:28pm
Print Post  
yes, I want to define a new geometric shape from the property grid, and assign it to ShapeNode.Shape? Basically I am looking for shapenode or something that allows me to create shape to accept control instead of image as
I wanted to edit the properties in proeprty grid so it not just an image thay has to be displayed on canvas.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Attachments
Reply #3 - Jul 23rd, 2008 at 5:36pm
Print Post  
ShapeNodes lets you display an image and some text inside a geometric shape. Controls can be displayed using a different type - the DiagramNodeAdapter class, so you cannot replace the ShapeNode's Image with a control through a property grid. You could provide other means to do that, e.g. a context menu. You could either delete the ShapeNode and add your control at the same position, or leave the ShapeNode there, add the control and call the DiagramNodeAdapter's AttachTo method to attach the control to the shape.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint