Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic ShapeListBox drag and drop to DiagramView (Read 5588 times)
alternative84
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 7
Joined: Jun 7th, 2010
ShapeListBox drag and drop to DiagramView
Jun 7th, 2010 at 8:28am
Print Post  
Hi,
I've created a new Visual Studio project, and I've inserted a DiagramView control and a ShapeListBox control. All I want to do is to be able to drag and drop items from the ShapeListBox to the DiagramView control. At this moment, when I drag and drop, the DiagramView control does nothing.

Thanks,
Juan J. Gómez
  
Back to top
 
IP Logged
 
alternative84
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 7
Joined: Jun 7th, 2010
Re: ShapeListBox drag and drop to DiagramView
Reply #1 - Jun 7th, 2010 at 8:31am
Print Post  
Oh, I forgot to say that I'm using JavaApplet mode and I have the trial version of NetDiagram.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: ShapeListBox drag and drop to DiagramView
Reply #2 - Jun 7th, 2010 at 8:38am
Print Post  
Hi,

See this thread and download the applet posted there:
http://mindfusion.eu/Forum/YaBB.pl?board=netdg_disc;action=display;num=127054900...

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


I love YaBB 1G - SP1!

Posts: 7
Joined: Jun 7th, 2010
Re: ShapeListBox drag and drop to DiagramView
Reply #3 - Jun 7th, 2010 at 11:30am
Print Post  
Thanks for the fast response, I replaced the applet and now it works. Now I'm trying to add a collection of custom shapes to the ShapeListBox.

Best regards,
Juan J. Gómez
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: ShapeListBox drag and drop to DiagramView
Reply #4 - Jun 7th, 2010 at 12:13pm
Print Post  
Hi,

Save the custom shapes to a shape library file and set its location as a value of the ShapeLibraryLocation property.

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


I love YaBB 1G - SP1!

Posts: 64
Joined: Aug 18th, 2010
Re: ShapeListBox drag and drop to DiagramView
Reply #5 - Aug 18th, 2010 at 1:56pm
Print Post  
hello

is it possible to have simple example or tutorial for custom shape list?

thanks a lot

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: ShapeListBox drag and drop to DiagramView
Reply #6 - Aug 18th, 2010 at 3:11pm
Print Post  
Hi,

1. Start the ShapeDesigner tool.
2. Ctrl + L to create a new library.
3. Move one of the control points to the interior to make the shape different from rectangle.
4. Right click the shape in the listbox and select Properties.
5. Enter MyShape as shape id.
6. Ctrl + S -> shapes.xml
7. Copy shapes.xml to the site's folder.
8. Set ShapeLibraryLocation="shapes.xml" in the DiagramView markup.
9. In Page_Load set diagramView.Diagram.DefaultShape = Shape.FromId("MyShape");

Now nodes drawn by the user should have this shape.
  
Back to top
 
IP Logged
 
chieh
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 64
Joined: Aug 18th, 2010
Re: ShapeListBox drag and drop to DiagramView
Reply #7 - Aug 24th, 2010 at 12:27pm
Print Post  
Hi
Thanks for your tutorial,

is there any way to define your own shape in ShapeListBox

and this ShapeListBox shows your own shapes only?

then user can drag the shape to DiagramView object.

any tutorial thanks a lot
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: ShapeListBox drag and drop to DiagramView
Reply #8 - Aug 24th, 2010 at 1:19pm
Print Post  
Hi,

There is a similar ShapeLibraryLocation property in ShapeListBox that should let you do that.

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


I love YaBB 1G - SP1!

Posts: 64
Joined: Aug 18th, 2010
Re: ShapeListBox drag and drop to DiagramView
Reply #9 - Aug 24th, 2010 at 1:23pm
Print Post  
thanks for your response

I found it


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