Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Clickable Images in a row (Read 2677 times)
Shine
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 5
Joined: Nov 28th, 2007
Clickable Images in a row
Nov 28th, 2007 at 11:36am
Print Post  
Hi,

I need some clickable images in one row.

i tried something like that

Code
Select All
		MindFusion.Diagramming.TableNode NewTableNode = new MindFusion.Diagramming.TableNode (diagram);

		NewTableNode.Bounds = new RectangleF (
		    startX + marginLeft,
		    startY + marginTop,
		    width,
		    height);
		NewTableNode.OffsetHeaderRows = true;
		NewTableNode.RedimTable (1, 0);

		// Eigenschaften der neuen TableNode
		NewTableNode.EnabledHandles = MindFusion.Diagramming.AdjustmentHandles.Move;
		NewTableNode.HandlesStyle = MindFusion.Diagramming.HandlesStyle.HatchFrame;
		NewTableNode.Constraints.MoveDirection = MindFusion.Diagramming.DirectionConstraint.Horizontal;
		NewTableNode.CellFrameStyle = MindFusion.Diagramming.CellFrameStyle.None;


		System.Drawing.RectangleF ButtonRectF = NewTableNode.Bounds;
		MindFusion.Diagramming.ShapeNode Button = this.diagramTasks.Factory.CreateShapeNode (ButtonRectF.Left + 2, ButtonRectF.Bottom - 7.3f, 5, 5);
		Button.HandlesStyle = MindFusion.Diagramming.HandlesStyle.MoveOnly;
		Button.Transparent = true;
		Button.Image = this.imageListTable.Images[0];
		Button.ImageAlign = MindFusion.Drawing.ImageAlign.Center;
		Button.AttachTo (NewTableNode, MindFusion.Diagramming.AttachToNode.TopRight);
		Button.Locked = true;
		Button.Visible = true;
		Button.Tag = 2;
 



If the Table is unselected, the image-button doesn't apear. If you select the Table, the image-button apears.

is there a option (z-order or something else) to change this behavior; the image-button should be visible all the time.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Clickable Images in a row
Reply #1 - Nov 28th, 2007 at 1:40pm
Print Post  
Hi,

Try to attach the button node to the table after both the table and the button have been added to the diagram. In addition, make sure the table is added before the button - the Z order depends on that.

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


I love YaBB 1G - SP1!

Posts: 5
Joined: Nov 28th, 2007
Re: Clickable Images in a row
Reply #2 - Nov 28th, 2007 at 6:45pm
Print Post  
hi,

i changed this line
Code
Select All
 MindFusion.Diagramming.TableNode NewTableNode = new MindFusion.Diagramming.TableNode (diagram);
to 


to
Code
Select All
MindFusion.Diagramming.TableNode NewTableNode = diagram.Factory.CreateTableNode (...
 



this change works fine. thanks for response.

I got an ohter prob. If you set diagram.NodesExpandable = true and collapse the TableNode, the Buttons (ShapeNode) stays at there positions. The TableNode gets invisible but the Buttons dont.

Do i need a (additional) group?

Do you need more code/video?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Clickable Images in a row
Reply #3 - Nov 29th, 2007 at 7:01am
Print Post  
Hi,

After calling button.AttachTo(), set NewTableNode.SubordinateGroup.Expandable = true.

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


I love YaBB 1G - SP1!

Posts: 5
Joined: Nov 28th, 2007
Re: Clickable Images in a row
Reply #4 - Nov 29th, 2007 at 2:24pm
Print Post  
hi,

NewTableNode.SubordinateGroup.Expandable = true works fine ... thanks again.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint