Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Append Image with Box.Text in netDiagram (Read 3959 times)
sripathi
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 7
Joined: Apr 21st, 2008
Append Image with Box.Text in netDiagram
Apr 28th, 2008 at 7:48am
Print Post  
Hi,

I am using netDiagram 1.0.4 version to display a Hierarchy Tree as a popup. The Tree is having Expand/Collapse Option OnBoxClicked on Boxes. Now I want image to be appended with Box.Text, so that when I click on that Image, Below screen should be loaded with clicked Box details. There is no Controls.Add Option to the Box Instance in this component .

Can anyone please advise me on this?

Thanks in Advance, Cheesy
Sripathi
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Append Image with Box.Text in netDiagram
Reply #1 - Apr 28th, 2008 at 9:21am
Print Post  
Hi,

If what you need is to display both an image and text inside nodes, set the Image and ImageAlign properties. You could set ImageAlign to Top and TextFormat.LineAlignment to Far to have the image displayed above the text. You must also set appropriate height so that that image and text do not overlap. This is shown in the LayeredLayout sample project.

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


I love YaBB 1G - SP1!

Posts: 7
Joined: Apr 21st, 2008
Re: Append Image with Box.Text in netDiagram
Reply #2 - Apr 28th, 2008 at 9:36am
Print Post  
Hi Stoyan,

Thanks for the quick reply...

Actually, I want to add the onclick event to that Image. So that when I click on that Image it should call javascript function and below Parent Screen should be loaded. But in the current scenario, I can just able to add the Image.

Please suggest me this.

Thanks,
Sripathi
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Append Image with Box.Text in netDiagram
Reply #3 - Apr 28th, 2008 at 9:58am
Print Post  
Hi,

Are you asking how to have a JavaScript function invoked when a box is clicked, or how to navigate the parent window to another URL?

Stoyan
  
Back to top
 
IP Logged
 
sripathi
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 7
Joined: Apr 21st, 2008
Re: Append Image with Box.Text in netDiagram
Reply #4 - Apr 28th, 2008 at 10:08am
Print Post  
Hi,

I am handling OnBoxClicked event to Collapse/Expand the Boxes. Now I need one Image on each box, on click of that Image below parent screen should reload and if I click on Box tree should Collapse/Expand.

Thanks,
Sripathi
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Append Image with Box.Text in netDiagram
Reply #5 - Apr 28th, 2008 at 10:41am
Print Post  
Hi,

Attach a helper image box to each primary box:

Code
Select All
Box imgbox = fc.CreateBox(...);
imgBox.Image = Image.FromFile(...);
imgBox.Transparent = true;
imgBox.Tag = "pic";
imgBox.AttachTo(primaryBox, ...);
primaryBox.SubordinateGroup.Expandable = true;
 



When you get the BoxClicked event, either reload the parent or expand/collapse, depending on the Box.Tag value.

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


I love YaBB 1G - SP1!

Posts: 7
Joined: Apr 21st, 2008
Re: Append Image with Box.Text in netDiagram
Reply #6 - Apr 28th, 2008 at 11:26am
Print Post  
Thanks Stoyo, I got the solution.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint