Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic IconNode not showing in ContainerNode (Read 2697 times)
Dant
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 4
Joined: Mar 30th, 2011
IconNode not showing in ContainerNode
Mar 30th, 2011 at 5:16am
Print Post  
Hi.

I create ContainerNode, add in him some IconNode and show diagram.
See ContainerNode but not visible IconNode.
If ContainerNode is selected then IconNode is visible.

how to do that would IconNode was always visible?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: IconNode not showing in ContainerNode
Reply #1 - Mar 30th, 2011 at 6:16am
Print Post  
Call IconNode.ZTop() in the end, if it was added before the container.

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


I love YaBB 1G - SP1!

Posts: 4
Joined: Mar 30th, 2011
Re: IconNode not showing in ContainerNode
Reply #2 - Mar 30th, 2011 at 7:17am
Print Post  
Call IconNode.ZTop() not helpful.

replace IconNode by ShapeNode the same result.



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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: IconNode not showing in ContainerNode
Reply #3 - Mar 30th, 2011 at 7:33am
Print Post  
ZTop() will have effect only if the node has been added to the diagram at that point. I.e. this won't work:

var node = new IconNode();
node.ZTop();
diagram.Nodes.Add(node);
  
Back to top
 
IP Logged
 
Dant
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 4
Joined: Mar 30th, 2011
Re: IconNode not showing in ContainerNode
Reply #4 - Mar 30th, 2011 at 8:59am
Print Post  
I do so

Code
Select All
...
        for()
        {
                ContainerNode cn = diagram.Factory.CreateContainerNode(10, 10, 40, 40);
                cn.Caption = id;
                cn.AutoShrink = true;
                cn.Brush = new MindFusion.Drawing.SolidBrush(Color.FromArgb(32, 0, 0, 0));
                cn.ShadowBrush = null;
                diagram.Nodes.Add(cn);
...
                for()
                {
                  ShapeNode icn = new ShapeNode(diagram);
                  cn.Add(icn);
                }
        }

...
            foreach (DiagramNode dn in diagram.Nodes)
            {
                if (dn is ContainerNode)
                {
                    ContainerNode cn = (ContainerNode)dn;
                    foreach (DiagramNode dnn in cn.SubordinateGroup.AttachedNodes)
                    {
                        dnn.ZTop();
                    }
                }
            }
...
 


I do not correctament?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: IconNode not showing in ContainerNode
Reply #5 - Mar 30th, 2011 at 9:20am
Print Post  
Do you ever call diagram.Nodes.Add(icn)?
  
Back to top
 
IP Logged
 
Dant
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 4
Joined: Mar 30th, 2011
Re: IconNode not showing in ContainerNode
Reply #6 - Mar 30th, 2011 at 9:34am
Print Post  
ok, after call diagram.Nodes.Add(icn) see shapenodes.

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