Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic ExpandButtonPosition not working with custom nodes (Read 2382 times)
acezanne
YaBB Newbies
*
Offline



Posts: 5
Joined: May 1st, 2010
ExpandButtonPosition not working with custom nodes
Sep 13th, 2010 at 8:39am
Print Post  
I am trying to change the ExpandButtonPosition in a diagram containing custom nodes so that the expand button is not overlapping links in a horizontal tree layout, but it has no effect and the button is always positioned outer right.

Do you have any suggestions why this might be the case?

Using version 1.7

Thanks in advance!

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: ExpandButtonPosition not working with custom n
Reply #1 - Sep 13th, 2010 at 1:42pm
Print Post  
It worked fine in our test with ShapeNodes, TreeViewNodes and types derived from them. Could you send to support@mindfusion.eu a sample project that reproduces that? If you are loading a diagram file before running TreeLayout, note that the property value will be read from the file too.

Stoyan
  
Back to top
 
IP Logged
 
acezanne
YaBB Newbies
*
Offline



Posts: 5
Joined: May 1st, 2010
Re: ExpandButtonPosition not working with custom n
Reply #2 - Sep 13th, 2010 at 3:08pm
Print Post  
Try in in the Tutorial3.sln, I can reproduce it there as well. (I basically followed that tutorial line by line for my node type).

The changes I made to Tutorial3 to reproduce this was to set ExpandButtonPosition="OuterLowerLeft" on the diagram and to set Expandable=true on the two nodes when creating them.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: ExpandButtonPosition not working with custom n
Reply #3 - Sep 13th, 2010 at 6:05pm
Print Post  
The expand icon is placed according to that property at initialization time only if the node's Diagram is known then. Afterwards, it is updated when the node's Bounds changes. So you could either implement the DiagramNode(Diagram) constructor and use it to create the nodes, or set node.Expandable or Bounds after calling diagram.Nodes.Add(node).

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



Posts: 5
Joined: May 1st, 2010
Re: ExpandButtonPosition not working with custom n
Reply #4 - Sep 14th, 2010 at 9:06am
Print Post  
Setting Expandable on the nodes after adding them did the trick, thank you!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint