Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic hyperlink (Read 3529 times)
vchimakurthi
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 28
Joined: Apr 6th, 2011
hyperlink
Jul 11th, 2011 at 12:29pm
Print Post  
hi,

can i display text in shapenode as hyperlink and want to execute  a method on click hyperlink event .

i did set

s.HyperLink="abc"

where s is shapenode

but nothing is displayed as hyperlink.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: hyperlink
Reply #1 - Jul 11th, 2011 at 1:34pm
Print Post  
You will have to set the node's Text, Font and optionally TextColor to make the text look like a hyperlink in a browser.

There's no separate click event for hyperlinks; you will have to run the method in response to the NodeClicked event. However you could call Diagram.MeasureString to find the text size and determine if the click is inside the text's bounding rectangle.

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


I love YaBB 1G - SP1!

Posts: 28
Joined: Apr 6th, 2011
Re: hyperlink
Reply #2 - Jul 11th, 2011 at 2:18pm
Print Post  
hi ,
fine i try to add link label to shape node as i c in example

LinkLabel lb = new LinkLabel();
               lb.Click += new EventHandler(lb_Click);
               lb.Text = name;

ControlNode cnode = new ControlNode(diagramView, lb);
cnode.Bounds = childNode.Bounds;
cnode.HandlesStyle = HandlesStyle.MoveOnly;
diagram.Nodes.Add(cnode);
cnode.AttachTo(childNode, AtachToNode.TopCenter);

but link are added in a row at the top of diagram
whats wrong wiht this

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: hyperlink
Reply #3 - Jul 11th, 2011 at 2:23pm
Print Post  
If you are running some layout algorithm after adding nodes, set its KeepGroupLayout property to true.
  
Back to top
 
IP Logged
 
vchimakurthi
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 28
Joined: Apr 6th, 2011
Re: hyperlink
Reply #4 - Jul 11th, 2011 at 2:50pm
Print Post  
hi,

can i have minimise and restore button in each shape node
how can i

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: hyperlink
Reply #5 - Jul 11th, 2011 at 4:45pm
Print Post  
You will have to implement them using either custom drawing and hit-testing or attached nodes. For the second method check the code from the "Entities" sample project after the "// add buttons to the table" comment.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint